-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
302 lines (286 loc) · 9.92 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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
[tool.isort]
profile = "black"
add_imports=["from __future__ import generator_stop"]
[tool.pytest.ini_options]
addopts = [
"--strict-config",
"--strict-markers",
"--cov",
"--cov-fail-under=92.11",
"--cov-report=term-missing:skip-covered",
]
xfail_strict = true
junit_family = "xunit2"
filterwarnings = ["error"]
[tool.coverage.run]
branch = true
source_pkgs = ["modernize"]
source = ["tests"]
[tool.coverage.paths]
source = [
".",
".tox/*/lib/*/site-packages/",
]
[tool.tox]
legacy_tox_ini = """
; tox configuration file for running tests on local dev env and Travis CI.
;
; The local dev environment will be executed against latest released Twisted.
; The coverage is reported only and local dev and not on Travis-CI as there
; we have separate reported (ex codecov.io)
[tox]
envlist =
py{36,37,38,39},lint
minversion=3.20.1
isolated_build=true
requires=
virtualenv >= 20.1.0
tox-wheel >= 0.6.0
tox-gh-actions >= 2.1.0
[testenv]
extras = test
commands = pytest {posargs}
wheel = True
wheel_build_env = build
[testenv:build]
# empty environment to build universal wheel once per tox invocation
# https://github.com/ionelmc/tox-wheel#build-configuration
[testenv:coveralls]
passenv = GITHUB_*
deps =
coveralls
coverage>=5.3
commands = coveralls
[testenv:lint]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure {posargs}
skip_install = true
[testenv:release]
deps = pep517
whitelist_externals =
cp
rm
commands =
rm -rf {toxinidir}/dist
cp -r {distdir} {toxinidir}/dist # copy the wheel built by tox-wheel
{envpython} -m pep517.build --source --out-dir={toxinidir}/dist {toxinidir}
"""
[tool.black]
line-length = 120
target_version = ['py37']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[tool.pylint."FORMAT"]
max-line-length=120
[tool.pylint."MESSAGES CONTROL"]
disable=["print-statement",
"parameter-unpacking",
"unpacking-in-except",
"old-raise-syntax",
"backtick",
"long-suffix",
"old-ne-operator",
"old-octal-literal",
"import-star-module-level",
"non-ascii-bytes-literal",
"raw-checker-failed",
"bad-inline-option",
"locally-disabled",
"file-ignored",
"suppressed-message",
"useless-suppression",
"deprecated-pragma",
"use-symbolic-message-instead",
"apply-builtin",
"basestring-builtin",
"buffer-builtin",
"cmp-builtin",
"coerce-builtin",
"execfile-builtin",
"file-builtin",
"long-builtin",
"raw_input-builtin",
"reduce-builtin",
"standarderror-builtin",
"unicode-builtin",
"xrange-builtin",
"coerce-method",
"delslice-method",
"getslice-method",
"setslice-method",
"no-absolute-import",
"old-division",
"dict-iter-method",
"dict-view-method",
"next-method-called",
"metaclass-assignment",
"indexing-exception",
"raising-string",
"reload-builtin",
"oct-method",
"hex-method",
"nonzero-method",
"cmp-method",
"input-builtin",
"round-builtin",
"intern-builtin",
"unichr-builtin",
"map-builtin-not-iterating",
"zip-builtin-not-iterating",
"range-builtin-not-iterating",
"filter-builtin-not-iterating",
"using-cmp-argument",
"eq-without-hash",
"div-method",
"idiv-method",
"rdiv-method",
"exception-message-attribute",
"invalid-str-codec",
"sys-max-int",
"bad-python3-import",
"deprecated-string-function",
"deprecated-str-translate-call",
"deprecated-itertools-function",
"deprecated-types-field",
"next-method-defined",
"dict-items-not-iterating",
"dict-keys-not-iterating",
"dict-values-not-iterating",
"deprecated-operator-function",
"deprecated-urllib-function",
"xreadlines-attribute",
"deprecated-sys-function",
"exception-escape",
"comprehension-escape",
"line-too-long",
"invalid-name",
"broad-except",
"missing-function-docstring",
"missing-class-docstring",
"assignment-from-no-return",
"too-few-public-methods",
"bad-whitespace",
"import-error",
"unused-variable",
"no-else-return",
"import-outside-toplevel",
"misplaced-comparison-constant",
"useless-else-on-loop",
"using-constant-test",
"consider-using-from-import",
"wrong-import-order",
"unnecessary-pass",
]
[tool.pyright]
# include = []
extraPaths = [
# "**/python", # wildcard does not supported here...
"python",
"vendor_python",
"lib",
"src",
]
exclude = [
"**/node_modules",
"**/__pycache__",
]
ignore = []
# typeshedPath = "stubs"
# typeshedPaths = ["stubs"]
# extraPaths = ["typing"]
reportUnusedImport = false
reportMissingImports = true
reportMissingTypeStubs = true
reportMissingModuleSource = false
pythonVersion = "3.7"
pythonPlatform = "Windows"
typeCheckingMode = "basic"
# include [array of paths, optional]
# exclude [array of paths, optional]
# ignore [array of paths, optional]
# strict [array of paths, optional]
# typeshedPath [path, optional]
# stubPath [path, optional]
# venvPath [path, optional]
# venv [string, optional]
# verboseOutput [boolean]
# extraPaths [array of strings, optional]
# pythonVersion [string, optional]
# pythonPlatform [string, optional]
# executionEnvironments [array of objects, optional]
# typeCheckingMode ["off", "basic", "strict"]
# useLibraryCodeForTypes [boolean]
# strictListInference [boolean]
# strictDictionaryInference [boolean]
# strictSetInference [boolean]
# strictParameterNoneValue [boolean]
# enableTypeIgnoreComments [boolean]
# reportGeneralTypeIssues [boolean or string, optional]
# reportPropertyTypeMismatch [boolean or string, optional]
# reportFunctionMemberAccess [boolean or string, optional]
# reportMissingImports [boolean or string, optional]
# reportMissingModuleSource [boolean or string, optional]
# reportMissingTypeStubs [boolean or string, optional]
# reportImportCycles [boolean or string, optional]
# reportUnusedImport [boolean or string, optional]
# reportUnusedClass [boolean or string, optional]
# reportUnusedFunction [boolean or string, optional]
# reportUnusedVariable [boolean or string, optional]
# reportDuplicateImport [boolean or string, optional]
# reportWildcardImportFromLibrary [boolean or string, optional]
# reportOptionalSubscript [boolean or string, optional]
# reportOptionalMemberAccess [boolean or string, optional]
# reportOptionalCall [boolean or string, optional]
# reportOptionalIterable [boolean or string, optional]
# reportOptionalContextManager [boolean or string, optional]
# reportOptionalOperand [boolean or string, optional]
# reportTypedDictNotRequiredAccess [boolean or string, optional]
# reportUntypedFunctionDecorator [boolean or string, optional]
# reportUntypedClassDecorator [boolean or string, optional]
# reportUntypedBaseClass [boolean or string, optional]
# reportUntypedNamedTuple [boolean or string, optional]
# reportPrivateUsage [boolean or string, optional]
# reportConstantRedefinition [boolean or string, optional]
# reportIncompatibleMethodOverride [boolean or string, optional]
# reportIncompatibleVariableOverride [boolean or string, optional]
# reportOverlappingOverload [boolean or string, optional]
# reportUninitializedInstanceVariable [boolean or string, optional]
# reportInvalidStringEscapeSequence [boolean or string, optional]
# reportUnknownParameterType [boolean or string, optional]
# reportUnknownArgumentType [boolean or string, optional]
# reportUnknownLambdaType [boolean or string, optional]
# reportUnknownVariableType [boolean or string, optional]
# reportUnknownMemberType [boolean or string, optional]
# reportMissingTypeArgument [boolean or string, optional]
# reportInvalidTypeVarUse [boolean or string, optional]
# reportCallInDefaultInitializer [boolean or string, optional]
# reportUnnecessaryIsInstance [boolean or string, optional]
# reportUnnecessaryCast [boolean or string, optional]
# reportUnnecessaryComparison [boolean or string, optional]
# reportAssertAlwaysTrue [boolean or string, optional]
# reportSelfClsParameterName [boolean or string, optional]
# reportImplicitStringConcatenation [boolean or string, optional]
# reportUndefinedVariable [boolean or string, optional]
# reportUnboundVariable [boolean or string, optional]
# reportInvalidStubStatement [boolean or string, optional]
# reportIncompleteStub [boolean or string, optional]
# reportUnsupportedDunderAll [boolean or string, optional]
# reportUnusedCallResult [boolean or string, optional]
# reportUnusedCoroutine [boolean or string, optional]