Skip to content

Commit d8bcb80

Browse files
committed
improve compatibility of flake8 with black
1 parent b4b2380 commit d8bcb80

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.flake8

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ ignore = E265,E266,E731,E704,
2525
A,
2626
D,
2727
RST, RST3
28-
max-line-length = 120
2928

3029
exclude = .tox,.venv,build,dist,doc,git/ext/,test
3130

3231
rst-roles = # for flake8-RST-docstrings
3332
attr,class,func,meth,mod,obj,ref,term,var # used by sphinx
3433

3534
min-python-version = 3.7.0
35+
36+
# for `black` compatibility
37+
max-line-length = 88
38+
extend-ignore = E203

.github/workflows/pythonpackage.yml

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
# and cause subsequent tests to fail
4545
cat test/fixtures/.gitconfig >> ~/.gitconfig
4646
47+
- name: Lint with black
48+
run: |
49+
set -x
50+
black --check .
51+
4752
- name: Lint with flake8
4853
run: |
4954
set -x

requirements-dev.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
# libraries for additional local testing/linting - to be added to test-requirements.txt when all pass
55

66
flake8-type-checking;python_version>="3.8" # checks for TYPE_CHECKING only imports
7-
# flake8-annotations # checks for presence of type annotations
8-
# flake8-rst-docstrings # checks docstrings are valid RST
9-
# flake8-builtins # warns about shadowing builtin names
10-
# flake8-pytest-style
7+
black
118

12-
# pytest-flake8
139
pytest-icdiff
1410
# pytest-profiling
1511

test-requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ddt>=1.1.1, !=1.4.3
22
mypy
33

4+
black
5+
46
flake8
57
flake8-bugbear
68
flake8-comprehensions

0 commit comments

Comments
 (0)