-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
85 lines (77 loc) · 1.83 KB
/
tox.ini
File metadata and controls
85 lines (77 loc) · 1.83 KB
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
77
78
79
80
81
82
83
84
85
[tox]
requires =
tox>=4.2
virtualenv<20.22.0
env_list =
tests
typecheck
[testenv:tests]
description = run tests
base_python = python2.7
commands =
python -m unittest discover --verbose
[testenv:typecheck]
description = run type check on code base
base_python = python3.12
skip_install = true
deps =
mypy[python2]@ git+https://github.com/coatl-dev/mypy.git@v0.971
commands =
mypy --install-types --non-interactive src
[testenv:stubgen]
description = generate stubs
base_python = python3.12
skip_install = true
deps =
mypy[python2]@ git+https://github.com/coatl-dev/mypy.git@v0.971
commands =
stubgen --export-less --output=stubs{/}stubs src
[testenv:style]
description = apply style
base_python = python3.12
skip_install = true
deps =
black
docformatter
flake8@ git+https://github.com/coatl-dev/flake8.git@5.0.4
isort
pydoclint
pydocstyle
sort-all
unimport
commands =
python -c \
"import pathlib, subprocess; \
files = [str(p) for p in pathlib.Path('src').rglob('*.py')]; \
subprocess.run(['sort-all'] + files, check=True)"
black --quiet src
unimport src
isort --settings-file=tox.ini src
docformatter \
--in-place \
--wrap-summaries 72 \
--close-quotes-on-newline \
--recursive \
src
flake8 --select=DOC --config=tox.ini src
pydocstyle --config=tox.ini src{/}system
[docformatter]
in-place = true
wrap-summaries = 72
close-quotes-on-newline = true
[flake8]
ignore = DOC202, E741, F821
max-complexity = 10
max-doc-length = 72
max-line-length = 120
style = google
arg-type-hints-in-docstring = False
arg-type-hints-in-signature = False
check-return-types = False
[isort]
extra_standard_library = typing
profile = black
py_version = 27
[pydocstyle]
convention = google
add_ignore = D101, D102, D104, D105, D106, D107, D205, D415