From 3748d252dfadd3f9f99ccf1559969b9f169a85b9 Mon Sep 17 00:00:00 2001 From: Andy Chosak Date: Tue, 25 Oct 2022 11:26:50 -0400 Subject: [PATCH] Fix flake8 configuration "tox -e lint" was failing on this repository. There were multiple conflicting configurations for flake8: in .flake8, tox, and setup.cfg. This commit simplifies so that the configuration only lives in .flake8, and works again even on the latest version of flake8. --- .flake8 | 6 ++---- setup.cfg | 2 -- tox.ini | 9 --------- 3 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 setup.cfg diff --git a/.flake8 b/.flake8 index 0be5005..220df43 100644 --- a/.flake8 +++ b/.flake8 @@ -9,10 +9,8 @@ ignore = # PEP8 weakly recommends Knuth-style line breaks before binary # operators W503, W504 -exclude = +extend-exclude = # These are directories that it's a waste of time to traverse - .git, - .tox, .venv, docs, venv, @@ -20,4 +18,4 @@ exclude = # Generated migration files will throw errors. We need to find a way # to exclude django-generated migrations while including # manually-written migrations. - */migrations/*.py, + **/migrations/*.py, diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 01d0caa..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -exclude = wagtailinventory/migrations/* diff --git a/tox.ini b/tox.ini index 2832a8b..8f66d23 100644 --- a/tox.ini +++ b/tox.ini @@ -36,15 +36,6 @@ commands= flake8 wagtailinventory setup.py isort --check-only --diff wagtailinventory -[flake8] -ignore=E731,W503,W504 -exclude= - .git, - .tox, - __pycache__, - */migrations/*.py, - */tests/testapp/migrations/*.py, - [isort] combine_as_imports=1 lines_after_imports=2