Skip to content

Commit 74b003b

Browse files
committed
Fix flake8 config to load properly in precommit
Also set B019 as ignored.
1 parent a23dd6d commit 74b003b

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

.flake8

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
[flake8]
2-
exclude = .git,.tox,__pycache__,.eggs,dist,.venv*,docs,build,_build
3-
# we enforce 80 char width with `black` "loosely", so flake8 should be set to
4-
# not fail on up to 90 chars of width
2+
exclude = .git,.tox,__pycache__,dist,.venv*,docs,build
53
max-line-length = 90
6-
7-
# based on the flake8 conf for `black` itself:
8-
# https://github.com/ambv/black/blob/master/.flake8
9-
#
10-
# W503/W504 conflict, black causes E203
11-
ignore = W503,W504,E203,
4+
# black related: W503/W504 conflict, black causes E203
5+
ignore = W503,W504,E203,B019

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ repos:
2626
rev: 7.1.0
2727
hooks:
2828
- id: flake8
29+
args: ['--config', '.flake8']
2930
additional_dependencies:
3031
- 'flake8-bugbear==24.1.17'
3132
- 'flake8-typing-as-t==0.0.3'

0 commit comments

Comments
 (0)