61 lines
972 B
TOML
61 lines
972 B
TOML
# Set the maximum line length to 120.
|
||
line-length = 120
|
||
target-version = "py313"
|
||
|
||
[lint]
|
||
select = [
|
||
"A",
|
||
"ANN",
|
||
"ASYNC",
|
||
"B",
|
||
"C4",
|
||
"DTZ",
|
||
"E",
|
||
"ERA",
|
||
"F",
|
||
"FAST",
|
||
"FLY",
|
||
"FURB",
|
||
"I",
|
||
"ISC",
|
||
"PERF",
|
||
"PGH",
|
||
"PIE",
|
||
"PL",
|
||
"PT",
|
||
"RUF",
|
||
"SIM",
|
||
"UP",
|
||
"W",
|
||
]
|
||
|
||
ignore = [
|
||
"SIM102", # collapsible-if
|
||
"SIM103", # return-bool-condition-directly (keeping explicit if/else for clarity)
|
||
"SIM108", # if-else-block-instead-of-if-exp
|
||
|
||
# Since we use ruff as a formatter, the following rules should be ignored
|
||
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
|
||
"W191",
|
||
"E111",
|
||
"E114",
|
||
"E117",
|
||
"E501",
|
||
"D206",
|
||
"D300",
|
||
"Q000",
|
||
"Q001",
|
||
"Q002",
|
||
"Q003",
|
||
"COM812",
|
||
"COM819",
|
||
"ISC002",
|
||
]
|
||
|
||
allowed-confusables = ["’", "х"]
|
||
|
||
[lint.flake8-annotations]
|
||
allow-star-arg-any = true
|
||
|
||
[lint.per-file-ignores]
|
||
"**/test_*.py" = ["PLR2004"] # magic-value-comparison - allow magic numbers in tests
|