mirror of
https://github.com/ansible/awx.git
synced 2026-08-04 12:00:03 -02:30
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) <noreply@anthropic.com>
41 lines
1.0 KiB
INI
41 lines
1.0 KiB
INI
[tox]
|
|
isolated_build = True
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
black
|
|
flake8
|
|
yamllint
|
|
allowlist_externals = make
|
|
setenv =
|
|
BLACK_ARGS = --check
|
|
PYTHON = python3
|
|
commands =
|
|
make black
|
|
flake8 awx awxkit awx_collection
|
|
yamllint -s .
|
|
|
|
[flake8]
|
|
select = F401,F402,F821,F823,F841,F811,E265,E266,F541,W605,E722,F822,F523,W291,F405
|
|
exclude = env,awx_collection_build,.tox
|
|
|
|
[testenv:pip-compile-docs]
|
|
description = Compile docs build lockfiles
|
|
deps =
|
|
# pip-tools config file support was introduced in v7
|
|
pip-tools >= 7
|
|
commands =
|
|
{envpython} -m piptools compile \
|
|
--output-file=docs/docsite/requirements.txt \
|
|
docs/docsite/requirements.in \
|
|
{posargs:--upgrade}
|
|
|
|
[testenv:docs]
|
|
description = Build documentation
|
|
deps =
|
|
-r{toxinidir}/docs/docsite/requirements.in
|
|
-c{toxinidir}/docs/docsite/requirements.txt
|
|
commands =
|
|
python {toxinidir}/docs/docsite/download-json.py
|
|
sphinx-build -T -E -W -n --keep-going {tty:--color} -j auto -c docs/docsite -d docs/docsite/build/doctrees -b html docs/docsite/rst docs/docsite/build/html
|