forked from Axonius/axonius_api_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (178 loc) · 4.1 KB
/
pyproject.toml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"
[tool.ruff]
select = [
"ALL", # Enable all checks.
]
ignore = [
"FBT", # While I agree with the concept, i'm not ready to enforce it yet.
"ANN", # Type hints related, let mypy handle these for now.
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"I",
"N",
"Q",
"S",
"T",
"W",
"ANN",
"ARG",
"BLE",
"COM",
"DJ",
"DTZ",
"EM",
"ERA",
"EXE",
"FBT",
"ICN",
"INP",
"ISC",
"NPY",
"PD",
"PGH",
"PIE",
"PL",
"PT",
"PTH",
"PYI",
"RET",
"RSE",
"RUF",
"SIM",
"SLF",
"TCH",
"TID",
"TRY",
"UP",
"YTT",
]
unfixable = []
# A list of task tags to recognize (e.g., "TODO", "FIXME", "XXX").
task-tags = ["TODO", "FIXME", "XXX"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"artifacts",
"docs",
"examples",
"tests",
]
per-file-ignores = {}
# 100 is a sane default for readability imho
line-length = 100
# show-source = true
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Python 3.7+
target-version = "py37"
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.flake8-unused-arguments]
ignore-variadic-names = true
# This code is used to check the number of arguments in a function.
[tool.ruff.pylint]
max-args = 20
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.pydocstyle]
convention = "google" # Accepts: "google", "numpy", or "pep257".
[tool.pytest.ini_options]
addopts = "--verbosity=2 -ra --strict-config --strict-markers --showlocals --cov-config=.coveragerc --cov=axonius_api_client --cov-report=html --cov-report=xml --cov-report=term:skip-covered --cov-append"
testpaths = ["axonius_api_client/tests"]
log_format = "%(asctime)s %(levelname)-8s [%(name)s:%(funcName)s:%(pathname)s:%(lineno)d] %(message)s"
log_level = "DEBUG"
log_file = "artifacts/pytest.log"
filterwarnings = [
'error:Extra attributes found',
'ignore:The distutils package:DeprecationWarning',
"ignore:'urllib3.contrib.pyopenssl:DeprecationWarning",
'ignore:ssl.wrap_socket\(\) is deprecated:DeprecationWarning',
'ignore:ssl.PROTOCOL_TLS is deprecated:DeprecationWarning',
'ignore:distutils Version classes:DeprecationWarning',
"ignore::marshmallow.warnings.RemovedInMarshmallow4Warning",
"ignore::urllib3.exceptions.InsecureRequestWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore::pytest.PytestUnhandledThreadExceptionWarning",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"datafiles: load a set of datafiles",
"tunneltests: tests for tunnels",
]
# WIP - stubs missing just about everywhere
[tool.mypy]
python_version = "3.7"
warn_return_any = true
warn_unused_configs = true
disallow_any_unimported = true
disallow_untyped_defs = true
no_implicit_optional = true
strict_equality = true
warn_unused_ignores = true
warn_redundant_casts = true
check_untyped_defs = true
show_error_codes = true
files = "axonius_api_client"
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[[tool.mypy.overrides]]
module = ['tests.*']
disallow_untyped_defs = false
strict_equality = false