From c0c9cfde2eb7ad0573bf68ddb34944833aeb1d3c Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 21 Dec 2020 20:32:49 +0100 Subject: [PATCH 1/3] Migrate to `extend-exclude` in flake8 config This makes sure that flake8's defaults are in use. Specifically, it excludes `.tox/` dir that is known to contain a lot of files in nested folders that are not supposed to be linted. Refs: * https://github.com/pypa/setuptools/issues/2501#issuecomment-749144396 * https://github.com/pypa/setuptools/pull/2486/files#r546877674 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-exclude * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-exclude --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 8bc2d27060..13381d6a5d 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] max-line-length = 88 -exclude = +extend-exclude = setuptools/_vendor pkg_resources/_vendor ignore = From 45721e8f5e9cbbdb5f2406cc125cd4855e83fa0a Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 21 Dec 2020 20:35:35 +0100 Subject: [PATCH 2/3] Exclude `build/lib/` artifacts in flake8 config --- .flake8 | 1 + 1 file changed, 1 insertion(+) diff --git a/.flake8 b/.flake8 index 13381d6a5d..5e1c7cae92 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,7 @@ [flake8] max-line-length = 88 extend-exclude = + build/lib setuptools/_vendor pkg_resources/_vendor ignore = From b091db995ff295d3d4ccc4717e401a1c134183a5 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 16 Jan 2021 18:30:18 -0500 Subject: [PATCH 3/3] Exclude _distutils from flake8 also. --- .flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 5e1c7cae92..a8bbdd53a5 100644 --- a/.flake8 +++ b/.flake8 @@ -1,8 +1,9 @@ [flake8] max-line-length = 88 extend-exclude = - build/lib + build setuptools/_vendor + setuptools/_distutils pkg_resources/_vendor ignore = # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513