From 9d67c302fd5b7126f9edf6a9e1fac66a62a323f1 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Mon, 3 Aug 2026 03:25:46 -0400 Subject: [PATCH] Exclude .tox from flake8 linter scope (#16566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit awxkit has its own tox.ini and when `tox -e linters` runs, awxkit/.tox/ can get populated with a py3 virtualenv. Since flake8 is configured to scan the `awxkit` directory, it recurses into awxkit/.tox/py3/lib/python3.12/site-packages/ and reports hundreds of false positives (F405, E265, E266) from third-party packages like PyYAML. Adding .tox to the flake8 exclude list prevents this — matching the existing exclusion of `env` for virtualenvs. Co-authored-by: Claude Opus 4.6 (1M context) --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e374047717..be5a05b5d5 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ commands = [flake8] select = F401,F402,F821,F823,F841,F811,E265,E266,F541,W605,E722,F822,F523,W291,F405 -exclude = env,awx_collection_build +exclude = env,awx_collection_build,.tox [testenv:pip-compile-docs] description = Compile docs build lockfiles