]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update black, zimports and flake8
authorCaselIT <cfederico87@gmail.com>
Wed, 12 May 2021 20:16:22 +0000 (22:16 +0200)
committerCaselIT <cfederico87@gmail.com>
Wed, 12 May 2021 20:16:22 +0000 (22:16 +0200)
Change-Id: Ia7d0ea7cc4389bc6adc4226efd5b18ecb68ffb2b

.gitignore
.pre-commit-config.yaml
tests/test_version_traversal.py
tox.ini

index 4a9a81557bd27a43bc6b9ec5a7b15a92ab755d8c..867283f939beabd4ca6bf4534cf85513019c4dad 100644 (file)
@@ -19,3 +19,4 @@ coverage.xml
 .pytest_cache/
 /docs/build/_build/
 /pysqlite_test_schema.db
+*.sqlite3
index 6577d38fc00367dadf326928b5ba9de0d8567d4d..84abf5bcd976bea94ae136c4a55485727d71bfa0 100644 (file)
@@ -2,17 +2,19 @@
 # See https://pre-commit.com/hooks.html for more hooks
 repos:
 -   repo: https://github.com/python/black
-    rev: 20.8b1
+    rev: 21.5b1
     hooks:
     -   id: black
 
 -   repo: https://github.com/sqlalchemyorg/zimports
-    rev: 0.2.2
+    rev: v0.4.0
     hooks:
     -   id: zimports
+        args:
+            - --keep-unused-type-checking
 
 -   repo: https://github.com/pycqa/flake8
-    rev: 3.8.4
+    rev: 3.9.2
     hooks:
     -   id: flake8
         additional_dependencies:
index 0b5306d312eed4692ade660dc5c53e0ca4113273..3895607fc560a0bf17a3c5f5889a0fb22f7a0824 100644 (file)
@@ -329,7 +329,7 @@ class BranchedPathTest(MigrationTest):
         )
 
     def test_relative_downgrade_baseplus2(self):
-        """ base+2 points to b, no branch label, drop everything above b. """
+        """base+2 points to b, no branch label, drop everything above b."""
         self._assert_downgrade(
             "base+2",
             [self.d2.revision, self.d1.revision],
@@ -356,7 +356,7 @@ class BranchedPathTest(MigrationTest):
         )
 
     def test_relative_downgrade_branchplus3(self):
-        """ c2branch@base+3 equivalent to c2. """
+        """c2branch@base+3 equivalent to c2."""
         self._assert_downgrade(
             self.c2.revision,
             [self.d2.revision, self.d1.revision],
@@ -437,7 +437,7 @@ class BranchedPathTest(MigrationTest):
         )
 
     def test_downgrade_single_branch_c1branch(self):
-        """ Use branch label to specify the branch to downgrade. """
+        """Use branch label to specify the branch to downgrade."""
         self._assert_downgrade(
             "c1branch@{}".format(self.b.revision),
             (self.c1.revision, self.d2.revision),
@@ -473,7 +473,7 @@ class BranchedPathTest(MigrationTest):
         )
 
     def test_downgrade_single_branch_d1(self):
-        """ Use the head revision to specify the branch. """
+        """Use the head revision to specify the branch."""
         self._assert_downgrade(
             "{}@{}".format(self.d1.revision, self.b.revision),
             (self.d1.revision, self.d2.revision),
@@ -547,7 +547,7 @@ class BranchedPathTest(MigrationTest):
         )
 
     def test_downgrade_no_effect_branched(self):
-        """Added for good measure when there are multiple branches. """
+        """Added for good measure when there are multiple branches."""
         self._assert_downgrade(
             self.c2.revision,
             [self.d1.revision, self.c2.revision],
diff --git a/tox.ini b/tox.ini
index 92e742be1d1bfd1732e5b0e2da4f21e129dadf4e..ec69f94ea09b914f10582beb8b2210909c33f841 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -69,7 +69,7 @@ deps=
       pydocstyle<4.0.0
       # used by flake8-rst-docstrings
       pygments
-      black==20.8b1
+      black==21.5b1
 commands =
      flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py {posargs}
      black --check setup.py tests alembic