-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
87 lines (79 loc) · 1.67 KB
/
ruff.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
target-version = "py312"
line-length = 79
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
[lint]
select = [ "ALL" ]
ignore = [
"ANN", # we have mypy for this
"D203", # prefer D211 `no-blank-line-before-class`
"D213", # prefer D212 `multi-line-summary-first-line`
"COM812", # conflicts with black and isort precedent
"ISC001", # to silence ruff warning
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = [ "ALL" ]
unfixable = [
"F401",
"F841",
"F842",
"PYI047",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
]
[lint.per-file-ignores]
"__init__.py" = ["D104", "E402"]
"dumbpw/cli.py" = ["T201"]
"**/{tests,docs}/*" = ["ARG", "ANN", "D", "S"]
[lint.mccabe]
max-complexity = 10
[lint.isort]
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
force-single-line = false
force-wrap-aliases = false
lines-after-imports = 2
lines-between-types = 0
split-on-trailing-comma = false
[format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
exclude = ["*.pyi"]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false