diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-05-18 07:55:40 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-05-18 07:55:40 +0800 |
commit | d8bcb80f765052a072a76a22cb6f885158922984 (patch) | |
tree | 50448375267b27e8290ac208e813292ff1a43480 | |
parent | b4b238057e7913c93245b484bdd50131dafd71f3 (diff) | |
download | gitpython-d8bcb80f765052a072a76a22cb6f885158922984.tar.gz |
improve compatibility of flake8 with black
-rw-r--r-- | .flake8 | 5 | ||||
-rw-r--r-- | .github/workflows/pythonpackage.yml | 5 | ||||
-rw-r--r-- | requirements-dev.txt | 6 | ||||
-rw-r--r-- | test-requirements.txt | 2 |
4 files changed, 12 insertions, 6 deletions
@@ -25,7 +25,6 @@ ignore = E265,E266,E731,E704, A, D, RST, RST3 -max-line-length = 120 exclude = .tox,.venv,build,dist,doc,git/ext/,test @@ -33,3 +32,7 @@ rst-roles = # for flake8-RST-docstrings attr,class,func,meth,mod,obj,ref,term,var # used by sphinx min-python-version = 3.7.0 + +# for `black` compatibility +max-line-length = 88 +extend-ignore = E203 diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 881f2ec5..1a10a4b2 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -44,6 +44,11 @@ jobs: # and cause subsequent tests to fail cat test/fixtures/.gitconfig >> ~/.gitconfig + - name: Lint with black + run: | + set -x + black --check . + - name: Lint with flake8 run: | set -x diff --git a/requirements-dev.txt b/requirements-dev.txt index f3aad629..bacde349 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,12 +4,8 @@ # libraries for additional local testing/linting - to be added to test-requirements.txt when all pass
flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only imports
-# flake8-annotations # checks for presence of type annotations
-# flake8-rst-docstrings # checks docstrings are valid RST
-# flake8-builtins # warns about shadowing builtin names
-# flake8-pytest-style
+black
-# pytest-flake8
pytest-icdiff
# pytest-profiling
diff --git a/test-requirements.txt b/test-requirements.txt index 53d8e606..d0b8f500 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,8 @@ ddt>=1.1.1, !=1.4.3 mypy +black + flake8 flake8-bugbear flake8-comprehensions |