/
tox.ini
111 lines (102 loc) · 2.51 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[tox]
envlist = py37, py38, py39, py310, py311, py312, pypy37, pypy38, pypy39, pypy310, lint, mypy
usedevelop = false
skip_missing_interpreters = true
setenv =
PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
[testenv]
allowlist_externals = poetry
skip_install = true
commands =
poetry install --no-root
poetry run pytest --cov=binobj {posargs:tests}
passenv =
COV_PYTHON_VERSION
COV_PLATFORM
COV_PYTHON_IMPLEMENTATION
[testenv:lint]
allowlist_externals = poetry
skip_install = true
basepython = python3.11
commands =
poetry install --no-root
poetry run flake8 --max-complexity 10
[testenv:mypy]
allowlist_externals = poetry
skip_install = true
basepython = python3.11
commands =
poetry install --no-root
poetry run mypy --config-file tox.ini binobj
[pytest]
addopts =
-vv
--cov=binobj
--cov-config=tox.ini
filterwarnings =
always::DeprecationWarning
[coverage:run]
branch = true
source = binobj
plugins =
coverage_pyver_pragma
[coverage:report]
show_missing = true
skip_covered = true
fail_under = 95.9
precision = 1
[flake8]
extend_ignore = D400,D401,E203,E501,U101,D105,D107,SIM106
exclude =
docs,
.git,
.mypy_cache,
.pytest_cache,
.tox,
build,
dist
max_line_length = 88
per_file_ignores =
__init__.py:F403,F401,D104
tests/*:D,IF100,S101,S311
; Plugin is broken, disabling for now
; unused_arguments_ignore_abstract_functions = true
; unused_arguments_ignore_dunder = true
; unused_arguments_ignore_overload_functions = true
; unused_arguments_ignore_override_functions = true
; unused_arguments_ignore_stub_functions = true
[isort]
combine_star = true
default_section = THIRDPARTY
force_single_line = true
from_first = false
known_first_party = binobj
line_length = 88
lines_after_imports = 2
order_by_type = false
use_parentheses = true
; See https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output = 3
include_trailing_comma = true
[mypy]
allow_untyped_globals = false
allow_redefinition = false
check_untyped_defs = true
disallow_any_decorated = false
disallow_any_generics = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = false
implicit_reexport = false
no_implicit_optional = true
show_error_codes = true
strict_optional = true
warn_no_return = true
warn_unreachable = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true