-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
270 lines (258 loc) · 7.67 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
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F", "I", "D", "YTT", "PL", "T20", "RSE", "RET", "SIM", "TID",
"TCH", "ARG", "PTH", "S", "ANN", "B"]
ignore = []
# 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 = []
fix-only = true
show-fixes = true
show-source = true
#fix = true
format = "grouped"
# Tags
task-tags = ["TODO", "FIXME", "todo", "fixme"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pycache__",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Per File
# Same as Black.
line-length = 100
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 15
[tool.ruff.per-file-ignores]
[tool.ruff.flake8-annotations]
allow-star-arg-any = false
ignore-fully-untyped = true
mypy-init-return = false
suppress-dummy-args = false
suppress-none-returning = false
[tool.ruff.flake8-bandit]
check-typed-exception = false
#hardcoded-tmp-directory = []
#extend-hardcoded-tmp-directory = [""]
[tool.ruff.flake8-bugbear]
#extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
[tool.ruff.flake8-builtins]
#builtins-ignorelist = [""]
[tool.ruff.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.flake8-errmsg]
max-string-length = 20
[tool.ruff.flake8-gettext]
#extend-function-names = ["ugettetxt"]
#function-names = ["_", "gettext", "ngettext", "ugettetxt"]
[tool.ruff.flake8-implicit-str-concat]
#setting allow-multiline = false should
#typically be coupled with disabling explicit-string-concatenation
allow-multiline = true
[tool.ruff.flake8-import-conventions]
[tool.ruff.flake8-import-conventions.aliases]
# Declare the default aliases.
# Declare the banned aliases.
# Declare the banned `from` imports.
# Declare a custom alias for the `matplotlib` module
[tool.ruff.flake8-pytest-style]
#fixture-parentheses = true
#mark-parentheses = true
#parametrize-names-type = "list"
#parametrize-values-row-type = "list"
#parametrize-values-type = "list"
#raises-extend-require-match-for = ["requests.RequestException"]
#raises-require-match-for = ["requests.RequestException"]
[tool.ruff.flake8-quotes]
avoid-escape = false
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "single"
[tool.ruff.flake8-self]
#ignore-names = ["_new"]
[tool.ruff.flake8-tidy-imports]
#ban-relative-imports = "all"
[tool.ruff.flake8-tidy-imports.banned-api]
[tool.ruff.flake8-type-checking]
#exempt-modules = ["typing", "typing_extensions"]
#runtime-evaluated-base-classes = ["pydantic.BaseModel"]
#runtime-evaluated-decorators = ["attrs.define", "attrs.frozen"]
strict = false
[tool.ruff.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.isort]
#classes = ["SVC"]
#constants = ["constant"]
#variables = ["VAR"]
#extra-standard-library = ["path"]
force-single-line = true
force-sort-within-sections = true
#force-to-top = ["src"]
#forced-separate = ["tests"]
force-wrap-aliases = true
combine-as-imports = true
known-first-party = ["src"]
#known-local-folder = ["src"]
#known-third-party = ["src"] # TODO: Add all third-party packages for packages.
#lines-after-imports = 1
lines-between-types = 1
#no-lines-before = ["future", "standard-library","third-party","first-party","local-folder","str"]
order-by-type = true
#relative-imports-order = "closest-to-furthest
#required-imports = ["from __future__ import annotations"]
#section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
#single-line-exclusions = ["os", "json"]
#split-on-trailing-comma = false
#[tool.ruff.isort.sections]
# Group all * imports into a/own/separate section.
[tool.ruff.pep8-naming]
#classmethod-decorators = ["pydantic.validator"]
#ignore-names = [""]
#staticmethod-decorators = ["stcmthd"]
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 100
[tool.ruff.pydocstyle]
convention = "google"
#ignore-decorators = ["typing.overload"]
#property-decorators = ["gi.repository.GObject.Property"]
[tool.ruff.pylint]
#allow-magic-value-types = ["int"]
#Type: list["str" | "bytes" | "complex" | "float" | "int" | "tuple"]
max-args = 6
max-branches = 12
max-returns = 6
max-statements = 50
[tool.ruff.pyupgrade]
keep-runtime-typing = true
# @todo: Add support for `mypy` static typing configuration.
[tool.mypy]
#Examples
##Imports
#mypy_path = ["src"] # https://mypy.readthedocs.io/en/stable/config_file.html#confval-mypy_path
#files = ["src"]
#modules = ["src"]
#packages = ["src"]
#exclude
namespace_packages = true
#current directory, or a member of the MYPYPATH environment variable or mypy_path config
explicit_package_bases = false
ignore_missing_imports = false
follow_imports = "skip"
#follow_imports_for_stubs = true
#python_executable = "python3.11"
no_site_packages = false
no_silence_site_packages = false
## Platform Configuration
python_version = "3.11"
#platform = "linux"
#always_true = ["tests"]
#always_false = ["tests"]
##Dynamic Typing
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = false
#Untyped
disallow_untyped_calls = false
disallow_incomplete_defs = false
check_untyped_defs = false
disallow_untyped_decorators = false
## None/Optionals - Flip values
implicit_optional = true
strict_optional = false
## Warnings
warn_redundant_casts = true
warn_unused_ignores = true
#warn_no_return = true #
#warn_return_any = true
warn_unreachable = true
ignore_errors = false
#Miscellaneous strictness
allow_untyped_globals = false
allow_redefinition = false
#local_partial_types = false
#enable_error_code = ["",""]
#disable_error_code = ["",""]
implicit_reexport = true
strict_concatenate = false
strict_equality = false
strict = false
## Config Error Messages
show_error_context = true
show_column_numbers = true
hide_error_codes = false
pretty = true
color_output = true
error_summary = true
show_absolute_path = false
## Incremental Mode
incremental = true
cache_dir = "~/.cache/mypy_cache"
sqlite_cache = true
cache_fine_grained = false
skip_version_check = false
#plugins = [""]
pdb = false
show_traceback = true
raise_exceptions = true
## Report generation
#Generating reports disables incremental mode and can significantly slow down your workflo
#any_exprs_report = ""
#html_report = ""
#linecount_report = ""
#lineprecision_report = ""
##Miscellaneous
#scripts_are_modules = true
warn_return_any = true
warn_unused_configs = true
verbosity = 2
#MyPy permodule
[[tool.mypy.overrides]]
module = ["google.oauth2.service_account"]
ignore_missing_imports = true
follow_imports_for_stubs = true
[[tool.mypy.overrides]]
module = ["gspread"]
ignore_missing_imports = true
follow_imports_for_stubs = true
[[tool.mypy.overrides]]
module = ["loguru"]
ignore_missing_imports = true
follow_imports_for_stubs = true
[[tool.mypy.overrides]]
module = ["dotenv"]
ignore_missing_imports = true
follow_imports_for_stubs = true
[[tool.mypy.overrides]]
[mypy-venv.Scripts]
file = ["venv\\Scripts\\activate_this.py"]
ignore_errors = true
exclude = ["venv\\Scripts\\activate_this.py"]
[[tool.mypy.overrides]]