-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
251 lines (234 loc) · 8.47 KB
/
pyproject.toml
File metadata and controls
251 lines (234 loc) · 8.47 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
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
[tool.ruff]
line-length = 100
target-version = "py310"
lint.select = [
"F", # Pyflakes
"E", # pycodestyle Error
"W", # pycodestyle Warning
"C90", # mccabe: C901: {name} is too complex ({complexity})
"I", # isort: unsorted-imports, missing-required-import
# "N", # pep8-naming
"D", # pydocstyle
"B", # flake8-bugbear
"UP", # pyupgrade
"YTT", # flake8-2020
# "ANN", # flake8-annotationsq, still gives errors for `self`
# "ASYNC", # flake8-async
"ASYNC1", # flake8-trio
# "S", # flake8-bandit
"BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap
# "B", flake8-bugbear
# "A", # flake8-builtins
"COM", # flake8-commas
# "CPY", # flake8-copyright --preview
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
# "T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"ARG", # flake8-unused-arguments
# "PTH", # flake8-use-pathlib
"PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # Pylint
# "TRY", # tryceratops, they all sound BS
# "FLY", # flynt
"NPY", # NumPy-specific rules
"AIR", # Airflow
"PERF", # Perflint
"FURB", # refurb --preview
"LOG", # flake8-logging
"RUF", # Ruff-specific rules
]
lint.ignore = [
"COM812",
"ISC001",
"SLF", # Private member accessed
"PYI034", # py3.11: `__iadd__` methods in classes like `SqEntryList` usually return `self` at runtime
"DTZ001", # The use of `datetime.datetime()` without `tzinfo` argument is not allowed
"DTZ005", # The use of `datetime.datetime.now()` without `tz` argument is not allowed
"PGH003", # Use specific rule codes when ignoring type issues
"PLR0914", # Too many local variables, 17 cases, --preview
"PLR0917", # Too many positional arguments, 23 cases, --preview
"PLR0915", # Too many statements, 28 cases
"FURB166", # Use of `int` with explicit `base=16` after removing prefix
"FURB103", # `open` and `write` should be replaced by `Path(...
"PLR2004", # Magic value used in comparison, consider replacing `...` with a constant variable
"PLC0415", # `import` should be at the top-level of a file
"PLW0603", # Using the global statement to update `mockLog` is discouraged
"PT027", # Use `pytest.raises` instead of unittest-style `assertRaises`, why?
"PD011", # Use `.to_numpy()` instead of `.values`, WTF?
"ICN001", # `tkinter` should be imported as `tk`, WTF?
"RUF005", # Consider `[*_list, x]` instead of concatenation
"PT009", # Use a regular `assert` instead of unittest-style `assertEqual`, why?
"PLR0911", # Too many return statements (x > 6)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"BLE001", # Do not catch blind exception: `Exception`
"G004", # Logging statement uses f-string, WTF?
"TRY400", # Use `logging.exception` instead of `logging.error`
"TRY003", # Avoid specifying long messages outside the exception class, ???
"RUF100", # Unused `noqa` directive (non-enabled: ...)
"FURB101", # `open` and `read` should be replaced by `Path(rootConfJsonFile).read_text()`
"B019", # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D205", # 1 blank line required between summary line and description
"D206", # Docstring should be indented with spaces, not tabs
"D211", # (Do not enable) no-blank-line-before-class
"D212", # multi-line-summary-first-line, conflicts with D213:multi-line-summary-second-line
"D401", # First line of docstring should be in imperative mood
"D417", # Missing argument descriptions in the docstring
"E402", # Module level import not at top of file
"E721", # Do not compare types, use `isinstance()`
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
"SIM117", # Use a single with statement with multiple contexts...
"UP009", # UTF-8 encoding declaration is unnecessary
"UP037", # Remove quotes from type annotation
"W191", # Indentation contains tabs
"SIM115", # Use context handler for opening files
"TCH003", # Move standard library import `...` into a type-checking block
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in ...
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
"wcwidth*",
".direnv",
".eggs",
".git",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"venv",
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
skip-magic-trailing-comma = false
line-ending = "lf"
docstring-code-format = false
exclude = [
]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 13
[tool.mypy]
exclude = [
# '.*/plugin_lib/.*',
]
[tool.refurb]
ignore = [
101, # Replace `with open(x, ...) as f: y = f.read()` with `y = Path(x).read_bytes()`
103, # Replace `with open(x, ...) as f: f.write(y)` with `Path(x).write_bytes(y)`
104, # Replace `os.getcwd()` with `Path.cwd()`
107, # Replace `try: ... except OSError: pass` with `with suppress(OSError): ...`
141, # Replace `os.path.exists(x)` with `Path(x).exists()`
144, # Replace `os.remove(x)` with `Path(x).unlink()`
146, # Replace `os.path.isfile(x)` with `Path(x).is_file()`
150, # Replace `os.makedirs(x)` with `Path(x).mkdir(parents=True)`
155, # Replace `os.path.getsize(x)` with `Path(x).stat().st_size`
]
# refurb has no exclude param!
#exclude = [
#]
#load = ["some_module"]
#quiet = true
[tool.pylint.messages_control]
max-line-length = 88
disable = [
"no-member",
"no-name-in-module",
"missing-module-docstring",
"bad-indentation",
"invalid-name",
"logging-fstring-interpolation",
"too-many-arguments",
"broad-exception-caught",
"missing-function-docstring",
"unused-argument",
"import-outside-toplevel",
"missing-class-docstring",
"too-many-instance-attributes",
"fixme",
"redefined-builtin",
"pointless-statement",
"abstract-method",
"unidiomatic-typecheck",
"attribute-defined-outside-init",
"unspecified-encoding",
"super-init-not-called",
"redefined-slots-in-subclass",
"redefined-outer-name",
"wrong-import-position",
"too-few-public-methods",
"too-many-lines",
"too-many-public-methods",
"too-many-statements",
"too-many-locals",
"too-many-branches",
"too-many-return-statements",
"unused-import",
"import-error",
"protected-access",
"consider-using-with",
"disallowed-name",
"useless-return",
"method-cache-max-size-none",
"global-statement",
"R0801", # Similar lines in 2 files
"ungrouped-imports", # C0412: Imports from package ... are not grouped
"inconsistent-return-statements", # R1710: Either all return statements in a function should return an expression, or none of them should
"too-many-ancestors", # R0901: Too many ancestors
]
[tool.pylint.master]
ignore-paths = [
]
[tool.vulture]
exclude = [
]
# ignore_decorators = ["@require_*"]
ignore_names = [
]
make_whitelist = true
min_confidence = 60
# paths = []
sort_by_size = false
verbose = false
[tool.import-analyzer]
exclude = []