Browse Source

Automatic formatting commit: 2020-09-23T12:11:26.382171

Getty Ritter 3 years ago
parent
commit
2b1b69ec0d
3 changed files with 6 additions and 1 deletions
  1. 3 1
      lc/migration.py
  2. 1 0
      stubs/playhouse/migrate.py
  3. 2 0
      tasks.py

+ 3 - 1
lc/migration.py

@@ -2,7 +2,8 @@ import re
 
 registered = []
 
-module_name_regex = re.compile('^.*m_([0-9]+)_([a-z_]+)')
+module_name_regex = re.compile("^.*m_([0-9]+)_([a-z_]+)")
+
 
 class Migration:
     def __init__(self, version, name, method):
@@ -13,6 +14,7 @@ class Migration:
     def run(self, db):
         self.method(db)
 
+
 def migration(method):
     match = module_name_regex.match(method.__module__)
     if not match:

+ 1 - 0
stubs/playhouse/migrate.py

@@ -1,5 +1,6 @@
 import typing
 
+
 class SqliteMigrator:
     def __init__(self, db: typing.Any):
         pass

+ 2 - 0
tasks.py

@@ -21,6 +21,7 @@ def run(c, port=8080, host="127.0.0.1"):
         },
     )
 
+
 @task
 def migrate(c, port=8080, host="127.0.0.1"):
     """Run migrations to update the database schema"""
@@ -34,6 +35,7 @@ def migrate(c, port=8080, host="127.0.0.1"):
         },
     )
 
+
 @task
 def install(c):
     """Install the listed dependencies into a virtualenv"""