-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
44 lines (36 loc) · 1.32 KB
/
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
38
39
40
41
42
43
44
[tox]
envlist = yapf-inplace,mypy,lint
[testenv]
basepython = python3.7
[testenv:unit]
description = Run unit tests with coverage and mypy type checking
extras = dev
commands = pytest --cov=ScryfallCardGolf --junitxml=test_results/junit-{envname}.xml {posargs:tests/}
[testenv:mypy]
description = mypy static type checking only
# mypy from master branch with NamedTuple method support
deps = git+git://github.com/python/mypy.git@master
commands = mypy --junit-xml=test_results/junit-mypy.xml {posargs:ScryfallCardGolf/}
[testenv:lint]
description = Run linting tools
deps = pylint
commands = pylint ScryfallCardGolf/ --rcfile=.pylintrc
[testenv:yapf-check]
description = Dry-run yapf to see if reformatting is needed
skip_install = True
deps = yapf
# TODO make it error exit if there's a diff
commands = yapf --diff --recursive --parallel --exclude=ScryfallCardGolf/generated_code/* ScryfallCardGolf/ tests/
[testenv:yapf-inplace]
description = Run yapf and edit all files in place
skip_install = True
deps = yapf
commands = yapf --in-place --recursive --parallel --exclude=ScryfallCardGolf/generated_code/* ScryfallCardGolf/ tests/
[testenv:isort-check]
description = dry-run isort to see if imports need resorting
deps = isort
commands = isort --check-only
[testenv:isort-inplace]
description = Sort imports
deps = isort
commands = isort -rc .