1
0
forked from mirrors/0ad

Enable additional ruff rules

In the ruff config file added in #6954 explicitly selecting the ruff
rules to check was missed, resulting in ruff only checking a very small
subset of its available rules. That hasn't been desired, so this is the
first of a series of commits enabling more rules. In this PR all rules
whose violations can be either automatically fixed by ruff or are
trivial to fix manually get enabled. For the follow up PRs it's intended
to focus on one area of rules per PR to gradually improve the Python
code quality.
This commit is contained in:
Dunedan
2024-08-25 06:29:39 +02:00
parent 0ba8ea3429
commit e36c6a31fe
39 changed files with 509 additions and 435 deletions
+53
View File
@@ -1,5 +1,58 @@
line-length = 99
[format]
line-ending = "lf"
[lint]
select = ["ALL"]
ignore = [
"A",
"ARG",
"ANN",
"B018",
"B023",
"C90",
"COM812",
"D",
"DTZ005",
"EM",
"ERA",
"FA",
"FIX",
"FBT",
"ISC001",
"N",
"PERF203",
"PERF401",
"PLR0912",
"PLR0913",
"PLR0915",
"PLR1704",
"PLR2004",
"PLW2901",
"PT",
"PTH",
"RUF012",
"S101",
"S310",
"S314",
"S324",
"S320",
"S603",
"S607",
"SIM102",
"SIM105",
"SIM113",
"SIM115",
"T20",
"TD",
"TRY002",
"TRY003",
"TRY004",
"UP038",
"W505"
]
[lint.isort]
lines-after-imports = 2