combine tox deps in order to unconfuse flake8-isort

with pytest not being included in the lint environment, flake8-isort
didn't know how to treat it vs. incorporealcms imports, leading to false
positives only inside tox. this makes it so that certain packages
(defined in base deps) can be imported in any/all envs, because they
show up in analyzed/imported/etc code rather than being merely tools
This commit is contained in:
Brian S. Stephan 2020-06-22 18:16:43 -05:00
parent 7b5f7ff00b
commit 5c1fc93ff9
1 changed files with 11 additions and 5 deletions

16
tox.ini
View File

@ -14,15 +14,22 @@ wheel_build_env = build
# whitelist commands we need
whitelist_externals = ln
# for environment sanity, things that are in written code being security
# checked, linted, etc., but are not part of the installed package, should
# go here, so that all envs may benefit from them
[base]
deps =
pytest
[testenv:build]
# require setuptools when building
deps = setuptools
[testenv:py37]
# run pytest and coverage
# run pytest with coverage
deps =
pytest
pytest-cov
{[base]deps}
commands =
pytest --cov={envsitepackagesdir}/incorporealcms/ \
--cov-report=term-missing --cov-branch --cov-fail-under=90
@ -34,6 +41,7 @@ commands =
# again it seems the most valuable here to run against the packaged code
deps =
bandit
{[base]deps}
commands =
bandit {envsitepackagesdir}/incorporealcms/ -r
@ -50,6 +58,7 @@ deps =
flake8-fixme
flake8-isort
flake8-logging-format
{[base]deps}
commands =
flake8
- flake8 --disable-noqa --select=E,W,F,C,D,A,G,B,I,DUO
@ -75,9 +84,6 @@ max-line-length = 120
[isort]
line_length = 120
# only way I could figure out how to make tests/conftest.py happy and have pytest separate from incorporealcms
# and if I let them be combined in tox runs, flake8-isort in vim would complain :(
forced_separate = incorporealcms
[pytest]
python_files =