Skip to content

Commit

Permalink
Fix flake8 config to load properly in precommit
Browse files Browse the repository at this point in the history
Also set B019 as ignored.
  • Loading branch information
sirosen committed Jul 27, 2024
1 parent a23dd6d commit 74b003b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
[flake8]
exclude = .git,.tox,__pycache__,.eggs,dist,.venv*,docs,build,_build
# we enforce 80 char width with `black` "loosely", so flake8 should be set to
# not fail on up to 90 chars of width
exclude = .git,.tox,__pycache__,dist,.venv*,docs,build
max-line-length = 90

# based on the flake8 conf for `black` itself:
# https://github.com/ambv/black/blob/master/.flake8
#
# W503/W504 conflict, black causes E203
ignore = W503,W504,E203,
# black related: W503/W504 conflict, black causes E203
ignore = W503,W504,E203,B019
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ repos:
rev: 7.1.0
hooks:
- id: flake8
args: ['--config', '.flake8']
additional_dependencies:
- 'flake8-bugbear==24.1.17'
- 'flake8-typing-as-t==0.0.3'
Expand Down

0 comments on commit 74b003b

Please # to comment.