forked from 0ad/0ad
Dunedan
bcf97b608b
This enables some ruff rules for docstrings and comments. The idea is to not enforce the presence of docstrings, but to ensure they are properly formatted if they're present. For comments this adds checks that they don't contain code and verify the formatting of comments with "TODO" tags. As part of this, some commented out code which hasn't been touch in the past 10 years gets removed as well. The rules enabled enabled by this are: - check formatting of existing docstrings (D200-) - check comments for code (ERA) - check formatting of TODO tags (TD001, TD004-)
55 lines
656 B
TOML
55 lines
656 B
TOML
line-length = 99
|
|
|
|
[format]
|
|
line-ending = "lf"
|
|
|
|
[lint]
|
|
select = ["ALL"]
|
|
ignore = [
|
|
"ANN",
|
|
"C90",
|
|
"COM812",
|
|
"D10",
|
|
"DTZ005",
|
|
"EM",
|
|
"FA",
|
|
"FIX",
|
|
"FBT",
|
|
"ISC001",
|
|
"N",
|
|
"PERF203",
|
|
"PERF401",
|
|
"PLR0912",
|
|
"PLR0913",
|
|
"PLR0915",
|
|
"PLR2004",
|
|
"PLW2901",
|
|
"PT",
|
|
"PTH",
|
|
"RUF012",
|
|
"S101",
|
|
"S310",
|
|
"S314",
|
|
"S324",
|
|
"S320",
|
|
"S603",
|
|
"S607",
|
|
"T20",
|
|
"TD002",
|
|
"TD003",
|
|
"TRY002",
|
|
"TRY003",
|
|
"TRY004",
|
|
"UP038",
|
|
"W505"
|
|
]
|
|
|
|
[lint.isort]
|
|
lines-after-imports = 2
|
|
|
|
[lint.pycodestyle]
|
|
max-doc-length = 72
|
|
|
|
[lint.pydocstyle]
|
|
convention = "pep257"
|