]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update black to match sqlalchemy version
authorCaselIT <cfederico87@gmail.com>
Tue, 17 Mar 2020 22:17:33 +0000 (23:17 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 18 Mar 2020 18:01:27 +0000 (18:01 +0000)
Also add a in the pep8 tox job a check to verify that all files
are properly formatted

Change-Id: I7bac8463b273f3bce9be098e6ee76f1761e28e72

.gitignore
.pre-commit-config.yaml
pyproject.toml [new file with mode: 0644]
tests/test_mysql.py
tox.ini

index 47a52f7a2aedbc712bc2d39199bc61527b1fffd2..4f13bf55e2e6d91d6e94b2a06eb0ccd5744b1693 100644 (file)
@@ -15,3 +15,5 @@ coverage.xml
 /scratch_test_*
 /test_schema.db
 .idea/
+.vscode/
+.pytest_cache/
\ No newline at end of file
index 863920ff32ac137cb0d4cf2a35f518049b84a054..de29c68c6b1248b324ccae3ab46585b7878fcba2 100644 (file)
@@ -2,10 +2,9 @@
 # See https://pre-commit.com/hooks.html for more hooks
 repos:
 -   repo: https://github.com/python/black
-    rev: 19.3b0
+    rev: 19.10b0
     hooks:
     -   id: black
-        args: [-l 79]
 
 -   repo: https://github.com/sqlalchemyorg/zimports
     rev: master
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644 (file)
index 0000000..a8f43fe
--- /dev/null
@@ -0,0 +1,2 @@
+[tool.black]
+line-length = 79
index 46d771b2e2e2379424f5e9e90585da0b1abede79..4294a31557f566e06921d6d3a5a9a5c6837014b8 100644 (file)
@@ -470,7 +470,7 @@ class MySQLBackendOpTest(AlterColRoundTripFixture, TestBase):
         )
 
     def test_add_timestamp_server_default_current_timestamp_bundle_onupdate(
-        self
+        self,
     ):
         # note SQLAlchemy reflection bundles the ON UPDATE part into the
         # server default reflection see
@@ -485,7 +485,7 @@ class MySQLBackendOpTest(AlterColRoundTripFixture, TestBase):
         )
 
     def test_add_datetime_server_default_current_timestamp_bundle_onupdate(
-        self
+        self,
     ):
         # note SQLAlchemy reflection bundles the ON UPDATE part into the
         # server default reflection see
diff --git a/tox.ini b/tox.ini
index 98b05143b169114a3e562141ff9b4c4339ab45a9..e872e6e32399379e56c2fa8ffd0d1a0e613ff5af 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -62,4 +62,7 @@ deps=
       pydocstyle<4.0.0
       # used by flake8-rst-docstrings
       pygments
-commands = flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py
+      black==19.10b0
+commands =
+     flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py
+     black --check .