-
Notifications
You must be signed in to change notification settings - Fork 143
/
tox.ini
37 lines (33 loc) · 1022 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[tox]
minversion = 1.6
envlist = lint,relnotes,protolint
skipsdist = True
[testenv:lint]
deps = -r{toxinidir}/tox/requirements_pythonlint_lock.txt
allowlist_externals =
bash
commands =
; Run isort, black, flake8, mypy
bash -ec 'git ls-files -- {posargs} | xargs pre-commit run --hook-stage manual --files'
[testenv:format]
deps = -r{toxinidir}/tox/requirements_pythonlint_lock.txt
allowlist_externals =
bash
commands =
; Format with isort followed by black
bash -ec 'git ls-files -- {posargs} | xargs pre-commit run isort --files ; \
git ls-files -- {posargs} | xargs pre-commit run black --files'
[testenv:yamllint]
basepython = python3.9
deps = -r{toxinidir}/tox/requirements_yamllint_lock.txt
commands =
yamllint {posargs} --no-warnings
[testenv:yamlformat]
basepython = python3.9
deps = -r{toxinidir}/tox/requirements_yamllint_lock.txt
allowlist_externals =
bash
commands =
bash -ec 'yamllint {posargs} --no-warnings \
| grep .yaml$ \
| xargs yamlfix'