22minversion = 1.6
33skipsdist = True
44skip_missing_interpreters = True
5- envlist = py310,py39,py38,py37,flake8,black, twine-check,mypy,isort,cz,pylint
5+ envlist = py310,py39,py38,py37,twine-check
66
77[testenv]
88passenv =
@@ -26,48 +26,6 @@ deps = -r{toxinidir}/requirements.txt
2626commands =
2727 pytest tests/unit tests/meta {posargs}
2828
29- [testenv:black]
30- basepython = python3
31- envdir ={toxworkdir}/lint
32- deps = -r{toxinidir}/requirements-lint.txt
33- commands =
34- black {posargs} .
35-
36- [testenv:isort]
37- basepython = python3
38- envdir ={toxworkdir}/lint
39- deps = -r{toxinidir}/requirements-lint.txt
40- commands =
41- isort {posargs} {toxinidir}
42-
43- [testenv:mypy]
44- basepython = python3
45- envdir ={toxworkdir}/lint
46- deps = -r{toxinidir}/requirements-lint.txt
47- commands =
48- mypy {posargs}
49-
50- [testenv:flake8]
51- basepython = python3
52- envdir ={toxworkdir}/lint
53- deps = -r{toxinidir}/requirements-lint.txt
54- commands =
55- flake8 {posargs} .
56-
57- [testenv:pylint]
58- basepython = python3
59- envdir ={toxworkdir}/lint
60- deps = -r{toxinidir}/requirements-lint.txt
61- commands =
62- pylint {posargs} gitlab/
63-
64- [testenv:cz]
65- basepython = python3
66- envdir ={toxworkdir}/lint
67- deps = -r{toxinidir}/requirements-lint.txt
68- commands =
69- cz check --rev-range 65ecadc..HEAD# cz is fast, check from first valid commit
70-
7129[testenv:twine-check]
7230basepython = python3
7331deps = -r{toxinidir}/requirements.txt
@@ -79,17 +37,6 @@ commands =
7937[testenv:venv]
8038commands = {posargs}
8139
82- [flake8]
83- exclude = .git,.venv,.tox,dist,doc,*egg,build,
84- max-line-length = 88
85- # We ignore the following because we use black to handle code-formatting
86- # E203: Whitespace before ':'
87- # E501: Line too long
88- # W503: Line break occurred before a binary operator
89- ignore = E203,E501,W503
90- per-file-ignores =
91- gitlab/v4/objects/__init__.py:F401,F403
92-
9340[testenv:docs]
9441deps = -r{toxinidir}/requirements-docs.txt
9542commands = sphinx-build -n -W --keep-going -b html docs build/sphinx/html
@@ -123,3 +70,16 @@ commands =
12370[testenv:smoke]
12471deps = -r{toxinidir}/requirements-test.txt
12572commands = pytest tests/smoke {posargs}
73+
74+ # pyproject.toml does not support flake8 yet
75+ # See: https://github.com/PyCQA/flake8/issues/234
76+ [flake8]
77+ exclude = .git,.venv,.tox,dist,doc,*egg,build,
78+ max-line-length = 88
79+ # We ignore the following because we use black to handle code-formatting
80+ # E203: Whitespace before ':'
81+ # E501: Line too long
82+ # W503: Line break occurred before a binary operator
83+ ignore = E203,E501,W503
84+ per-file-ignores =
85+ gitlab/v4/objects/__init__.py:F401,F403