-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
76 lines (68 loc) · 1.54 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[tox]
requires =
tox>=4
env_list = format, lint, mypy, py{39,310,311,312,313}, docs
[testenv]
description = run unit tests
deps =
pytest>=7
pytest-sugar
commands =
pytest --maxfail 1 {posargs:tests}
[testenv:mypy]
description = run mypy checks
deps =
pytest>=7
mypy>=1.2.0
commands =
mypy --check-untyped-defs {posargs:utctime tests}
[testenv:format]
description = code formatting
skip_install = true
deps =
black==23.3.0
commands = black {posargs:.}
[testenv:lint]
deps =
{[testenv:pylint]deps}
{[testenv:flake8]deps}
commands =
{[testenv:pylint]commands}
{[testenv:flake8]commands}
[testenv:pylint]
description = code linting
deps =
pylint>=3.3.2,<3.4.0
commands = pylint {posargs:utctime tests}
[testenv:flake8]
deps =
flake8
flake8-rst-docstrings
flake8-sphinx-links
flake8-bugbear
flake8-annotations
flake8-bandit
flake8-simplify
flake8-warnings
flake8-datetimez
flake8-commas
flake8-eradicate
pep8-naming
commands =
flake8 {posargs:utctime tests}
[flake8]
max-line-length = 99
ignore = SIM105, ANN401, RST304, ANN204
per-file-ignores =
# Ignore F401 'imported but unused' in __init__.py files
*/__init__.py: F401
tests/**.py: S101, ANN201, DTZ001, DTZ003, DTZ005, DTZ006
[testenv:docs]
description = build sphinx docs
changedir = docs
deps =
sphinx>=6.2,<6.3
sphinx-rtd-theme>=3.0.2,<3.1.0
commands =
sphinx-build -W -b doctest -d {envtmpdir}/doctrees . {envtmpdir}/html
sphinx-build -v -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html