1
0
forked from mirrors/0ad
Files
0ad/ruff.toml
T
Dunedan c3b99feb60 Enable ruff rules for code simplification
This enables ruff rules which check for code which can be simplified to
improve readability.

The additionally rules getting enabled by this are:

- remove unnecessary nesting of if-statements (SIM102)
- use contextlib.suppress() for no-op exception handling (SIM105)
- use enumerate() for counting in loops (SIM113)
- use context managers for opening files (SIM115)
2024-08-29 07:00:43 +02:00

55 lines
649 B
TOML

line-length = 99
[format]
line-ending = "lf"
[lint]
select = ["ALL"]
ignore = [
"ANN",
"C90",
"COM812",
"D",
"DTZ005",
"EM",
"ERA",
"FA",
"FIX",
"FBT",
"ISC001",
"N",
"PERF203",
"PERF401",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR2004",
"PLW2901",
"PT",
"PTH",
"RUF012",
"S101",
"S310",
"S314",
"S324",
"S320",
"S603",
"S607",
"T20",
"TD",
"TRY002",
"TRY003",
"TRY004",
"UP038",
"W505"
]
[lint.isort]
lines-after-imports = 2
[lint.pycodestyle]
max-doc-length = 72
[lint.pydocstyle]
convention = "pep257"