-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathruff.toml
38 lines (33 loc) · 1.55 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
target-version = "py311"
lint.select = ["ALL"]
lint.preview = true
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"CPY001", # Missing copyright notice at top of file
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"FBT003", # Boolean positional value in function call
"FURB110", # Replace ternary `if` expression with `or` operator
"FURB118", # Use `operator.itemgetter(0)` instead of defining a lambda
"N818", # Exception name should be named with an Error suffix
"PLC1901", # can be simplified as an empty string is falsey
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"RUF021", # Parenthesize expressions when chaining `and` and `or` together, to make the precedence clear
"RUF029", # Function is declared `async`, but doesn't `await` or use `async` features.
"TRY003", # Avoid specifying long messages outside the exception class
]
[lint.per-file-ignores]
"library_test.py" = [
"PLR0915", # Too many statements
"T201", # `print` found
]
"tests/*" = [
"S101", # Use of `assert` detected
]
[lint.mccabe]
max-complexity = 18