-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
55 lines (47 loc) · 1.12 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
45
46
47
48
49
50
51
52
53
54
55
[tox]
envlist = py37,py38,py39,py310,manifest,check-formatting,lint,mypy
skipsdist = True
usedevelop = True
[testenv]
deps = -e .[dev]
commands =
pytest tests {posargs}
setenv =
SOURCE = {toxinidir}/realbook
TEST_SOURCE = {toxinidir}/tests
LINE_LENGTH = 120
[testenv:manifest]
deps = check-manifest
skip_install = true
commands = check-manifest --ignore 'tests/*'
[testenv:check-formatting]
basepython = python3.8
deps = black
skip_install = true
commands =
black {env:SOURCE} tests --line-length {env:LINE_LENGTH} --diff --check
[testenv:format]
basepython = python3.8
deps = black
skip_install = true
commands =
black {env:SOURCE} tests --line-length {env:LINE_LENGTH}
[testenv:lint]
basepython = python3.8
deps = flake8
skip_install = true
commands = flake8
[testenv:mypy]
basepython = python3.8
deps =
mypy
types-protobuf
commands = mypy realbook tests --strict --ignore-missing-imports --allow-subclassing-any --allow-untyped-decorators
[flake8]
show-source = true
max-line-length = 120
exclude = .venv,.tox,.git,dist,doc,*.egg,build
ignore = E203,E731,W503,
[pytest]
addopts = -v
testpaths = tests