forked from bentoml/BentoML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
181 lines (166 loc) · 6.57 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
[build-system]
requires = [
# sync with setup.py until we discard non-pep-517/518
"wheel",
"setuptools>=59.0",
"setuptools-scm[toml]>=6.2.3",
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "bentoml/_version.py"
git_describe_command = "git describe --dirty --tags --long --first-parent"
version_scheme = "post-release"
[tool.black]
line-length = 88
exclude = '''
(
/(
\.eggs
| \.git
| \.tox
| \.venv
| _build
| build
| dist
| typings
)/
| bentoml/_version.py
)
'''
[tool.pytest.ini_options]
addopts = "-rafEX -p pytester"
python_files = ["test_*.py","*_test.py"]
testpaths = ["tests"]
markers = ["gpus"]
[tool.pylint.master]
ignore=".ipynb_checkpoints,typings"
ignore-paths=".*.pyi"
unsafe-load-any-extension="no"
extension-pkg-whitelist="numpy,tensorflow,torch,paddle,keras"
jobs=4
persistent="yes"
suggestion-mode="yes"
max-line-length=88
[tool.pylint.messages_control]
disable="import-error,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,invalid-unicode-literal,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,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,logging-fstring-interpolation,logging-format-interpolation,logging-not-lazy,C,R,fixme,protected-access,no-member,unsubscriptable-object,raise-missing-from"
enable="c-extension-no-member"
[tool.pylint.reports]
evaluation="10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)"
msg-template="{msg_id}:{symbol} [{line:0>3d}:{column:0>2d}] {obj}: {msg}"
output-format="colorized"
reports="no"
score="yes"
[tool.pylint.refactoring]
max-nested-blocks=5
never-returning-functions="optparse.Values,sys.exit"
[tool.pylint.miscellaneous]
notes="FIXME,XXX,TODO"
[tool.pylint.typecheck]
ignored-classes="Namespace"
contextmanager-decorators="contextlib.contextmanager"
[tool.pylint.format]
indent-after-paren=4
indent-string=' '
max-line-length=100
max-module-lines=1000
no-space-check="trailing-comma,dict-separator"
single-line-class-stmt="no"
single-line-if-stmt="no"
[tool.pylint.imports]
allow-wildcard-with-all="no"
analyse-fallback-blocks="no"
[tool.pylint.classes]
defining-attr-methods="__init__,__new__,setUp"
exclude-protected="_asdict,_fields,_replace,_source,_make"
valid-classmethod-first-arg="cls"
valid-metaclass-classmethod-first-arg="mcs"
[tool.pylint.design]
# Maximum number of arguments for function / method
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in a if statement
max-bool-expr=5
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of statements in function / method body
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[tool.isort]
profile = "black"
length_sort = true
force_single_line = true
order_by_type = true
force_alphabetical_sort_within_sections = true
skip_glob = ["typings/*", "docs/*"]
[tool.pyright]
pythonVersion = "3.10"
include = ["bentoml", "typings"]
exclude = ['bentoml/_version.py','bentoml/__main__.py']
strictListInference = true
strictDictionaryInference = true
strictSetInference = true
strictParameterNoneValue = true
enableTypeIgnoreComments = true
reportGeneralTypeIssues = "error"
reportPropertyTypeMismatch = "error"
reportFunctionMemberAccess = "error"
reportMissingImports = "warning"
reportMissingModuleSource = "warning"
reportMissingTypeStubs = "error"
reportUnusedImport = "error"
reportUnusedClass = "error"
reportUnusedFunction = "error"
reportUnusedVariable = "error"
reportDuplicateImport = "error"
reportWildcardImportFromLibrary = "error"
reportOptionalSubscript = "error"
reportOptionalMemberAccess = "error"
reportOptionalCall = "error"
reportOptionalIterable = "error"
reportOptionalContextManager = "error"
reportOptionalOperand = "error"
reportTypedDictNotRequiredAccess = "error"
reportUntypedFunctionDecorator = "error"
reportUntypedClassDecorator = "error"
reportUntypedBaseClass = "error"
reportUntypedNamedTuple = "error"
reportPrivateUsage = "error"
reportPrivateImportUsage = "error"
reportConstantRedefinition = "error"
reportIncompatibleMethodOverride = "error"
reportIncompatibleVariableOverride = "error"
reportOverlappingOverload = "error"
reportUninitializedInstanceVariable = "none"
reportInvalidStringEscapeSequence = "error"
reportUnknownParameterType = "error"
reportUnknownArgumentType = "error"
reportUnknownLambdaType = "error"
reportUnknownVariableType = "error"
reportUnknownMemberType = "warning"
reportMissingParameterType = "error"
reportMissingTypeArgument = "error"
reportInvalidTypeVarUse = "error"
reportCallInDefaultInitializer = "none"
reportUnnecessaryIsInstance = "warning"
reportUnnecessaryCast = "error"
reportUnnecessaryComparison = "error"
reportAssertAlwaysTrue = "error"
reportSelfClsParameterName = "error"
reportImplicitStringConcatenation = "none"
reportUndefinedVariable = "error"
reportUnboundVariable = "error"
reportInvalidStubStatement = "error"
reportIncompleteStub = "error"
reportUnsupportedDunderAll = "error"
reportUnusedCallResult = "none"
reportUnusedCoroutine = "error"