From 74b003b82ad9e127ff7e9c7b0e0d36e38625bbf0 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Sat, 27 Jul 2024 15:50:30 -0500 Subject: [PATCH] Fix flake8 config to load properly in precommit Also set B019 as ignored. --- .flake8 | 12 +++--------- .pre-commit-config.yaml | 1 + 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.flake8 b/.flake8 index e929422ea..c56dba3ab 100644 --- a/.flake8 +++ b/.flake8 @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb52d1107..80e266cf5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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'