-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
71 lines (62 loc) · 2.02 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
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# https://beta.ruff.rs/docs/rules/
select = ["A", "B", "C", "D", "E", "F", "DTZ", "RUF", "S", "COM", "C4", "DJ", "EM", "ISC", "ICN", "PIE", "RET", "SLF", "SIM", "TID", "PD", "NPY"]
ignore = [
"SLF001", # Private member accessed
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in __init__
"A003", # attribute is shadowing a Python builtin
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the first line
"C901", # McCabe complexity is too high
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
# Allow autofix for all enabled rules (when `--fix`) is provided
fixable = ["A", "B", "C", "D", "E", "F", "DTZ", "RUF", "S", "COM", "C4", "DJ", "EM", "ISC", "ICN", "PIE", "RET", "SLF", "SIM", "TID", "PD", "NPY"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
".venv",
"migrations",
]
pydocstyle.convention ="google"
# Same as Black.
line-length = 150
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401", "F403", "D104"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 60