-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathruff.toml
More file actions
91 lines (84 loc) · 2.28 KB
/
ruff.toml
File metadata and controls
91 lines (84 loc) · 2.28 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
target-version = "py39"
line-length = 120
[lint]
exclude = [
"tests/fixtures/*.py",
]
select = [
"A", "ANN", "ARG",
"B", "BLE",
"C", "C4",
"COM",
"D", "DTZ",
"E", "ERA", "EXE",
"F", "FBT",
"G",
"I", "ICN", "INP", "ISC",
"N",
"PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
"Q",
"RUF", "RSE", "RET",
"S", "SIM", "SLF",
"T", "T10", "T20", "TCH", "TID", "TRY",
"UP",
"W",
"YTT",
]
ignore = [
"A001", # Variable is shadowing a Python builtin
"ANN101", # Missing type annotation for self
"ANN102", # Missing type annotation for cls
"ANN204", # Missing return type annotation for special method __str__
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"ARG005", # Unused lambda argument
"C901", # Too complex
"D105", # Missing docstring in magic method
"D417", # Missing argument description in the docstring
"E501", # Line too long
"ERA001", # Commented out code
"G004", # Logging statement uses f-string
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"SLF001", # Private member accessed
"TRY003", # Avoid specifying long messages outside the exception class
]
[lint.per-file-ignores]
"src/**/cli.py" = [
"T201", # Print statement
]
"src/*/debug.py" = [
"T201", # Print statement
]
"!src/*/*.py" = [
"D100", # Missing docstring in public module
]
"!src/**.py" = [
"D101", # Missing docstring in public class
"D103", # Missing docstring in public function
]
"scripts/*.py" = [
"INP001", # File is part of an implicit namespace package
"T201", # Print statement
]
"tests/**.py" = [
"ARG005", # Unused lambda argument
"FBT001", # Boolean positional arg in function definition
"PLR2004", # Magic value used in comparison
"S101", # Use of assert detected
]
[lint.flake8-quotes]
docstring-quotes = "double"
[lint.flake8-tidy-imports]
ban-relative-imports = "all"
[lint.isort]
known-first-party = ["mkdocstrings_handlers.python"]
[lint.pydocstyle]
convention = "google"
[format]
exclude = [
"tests/fixtures/*.py",
]
docstring-code-format = true
docstring-code-line-length = 80