0ad/ruff.toml
Dunedan 0ea6d32fa5
Enable various ruff rules
This commit enables a bunch of unrelated ruff rules, which only require
minimal changes to the code base to enable them.

The rules enabled by this commit are:

- check the use of datetime objects without timezone (DTZ005)
- check the performance of try-except in loops (PERF203)
- check the number of function arguments (PLR0913)
- check for mutable class defaults (RUF012)
- check for the use of secure hashing algorithms (S324)
- check for raising base exceptions (TRY002)
- check for raising other exceptions where TypeErrors should be raised
  (TRY004)
2024-09-21 20:54:30 +02:00

53 lines
615 B
TOML

line-length = 99
target-version = "py311"
[format]
line-ending = "lf"
[lint]
select = ["ALL"]
ignore = [
"ANN",
"C90",
"COM812",
"D10",
"EM",
"FA",
"FIX",
"FBT",
"ISC001",
"N817",
"PERF401",
"PLR0912",
"PLR0915",
"PLR2004",
"PLW2901",
"PT",
"PTH",
"S101",
"S310",
"S314",
"S320",
"S603",
"S607",
"T20",
"TD002",
"TD003",
"TRY003",
"UP038",
"W505"
]
[lint.isort]
lines-after-imports = 2
[lint.pycodestyle]
max-doc-length = 72
[lint.pydocstyle]
convention = "pep257"
[lint.pylint]
max-args = 8