-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
128 lines (113 loc) · 3.26 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
[tool.bandit]
skips = ["B101"]
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
disallow_incomplete_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_ignores = true
# strict = true
no_implicit_reexport = true
strict_equality = true
pretty = true
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
disallow_any_generics = true
check_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 120
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = ["E", "W", "RUF", "UP", "D"]
ignore = [
#### modules
"EM", # no formatting in exceptions (why is this a rule?)
"C90", # mccabe complexity
"DJ", # django
"TD", # too many todos/fixmes
#### rules
"SIM108", # ternary operator should be used without a concearn for the code complexity
"G004", # while if all parameters had
# docstrings
"D100", # Missing docstring in public module => too much work
"D101", # Missing docstring in public class => too much work
"D104", # Missing docstring in public package => too much work
"D107", #docstring in `__init__`
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible.
"D400", # Gramar police much? (First line should end with a period)
"D415", # Gramar police much? (First line should end with a period, question mark, or exclamation point)
# formatter conflicts
"W191", # tab-indentation
"E501", # line-too-long
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
# deprecated
"ANN101", # enforeces classmethods calasses have types
"ANN102", # enforeces self has a type
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in docstrings.
docstring-code-line-length = "dynamic"