From: CaselIT Date: Tue, 17 Mar 2020 22:17:33 +0000 (+0100) Subject: Update black to match sqlalchemy version X-Git-Tag: rel_1_4_2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=499ccb3ed186c52925ecfdb81f5e9859dd1e5122;p=thirdparty%2Fsqlalchemy%2Falembic.git Update black to match sqlalchemy version Also add a in the pep8 tox job a check to verify that all files are properly formatted Change-Id: I7bac8463b273f3bce9be098e6ee76f1761e28e72 --- diff --git a/.gitignore b/.gitignore index 47a52f7a..4f13bf55 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ coverage.xml /scratch_test_* /test_schema.db .idea/ +.vscode/ +.pytest_cache/ \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 863920ff..de29c68c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 index 00000000..a8f43fef --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[tool.black] +line-length = 79 diff --git a/tests/test_mysql.py b/tests/test_mysql.py index 46d771b2..4294a315 100644 --- a/tests/test_mysql.py +++ b/tests/test_mysql.py @@ -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 98b05143..e872e6e3 100644 --- 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 .