jcloude/ruff.toml
2025-12-23 19:17:16 +08:00

40 lines
929 B
TOML

line-length = 110
indent-width = 4
target-version = "py310"
[format]
quote-style = "double"
indent-style = "tab"
[lint]
select = [
"F",
"E",
"W",
"I",
"UP",
"B",
"RUF",
"FA",
"TCH",
"C90",
"RET",
"SIM",
]
ignore = [
"UP015", # Unnecessary open mode parameters
"SIM108", # Use ternary operator {contents} instead of if-else-block
"F821", # Undefined name, cause of DF.Literal
"F722", # syntax error in forward type annotation, cause of DF.Literal
"E501", # line too long, cause hooks.py
"W191", # indentation contains tabs, cause when the world zigs, we zag
"B023", # function doesn't bind loop variable - will have last iteration's value
"UP037", # remove quotes from annotations, messes up DF.Literal typing
"UP038", # is deprecated and isn't recommended practice
"SIM103", # return condition directly, readability suffers at times
]
[lint.mccabe]
max-complexity = 8