🚨 Add linter

This commit is contained in:
Stanislas Daniel Claude Dolcini 2024-09-11 15:24:13 +03:00
parent 97d04be759
commit 6c752be00e
Signed by: Stan
GPG Key ID: 244943DFF8370D60
2 changed files with 66 additions and 0 deletions

View File

@ -16,3 +16,15 @@ repos:
- id: yamllint
args:
- -s
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
hooks:
- id: ruff
args:
- --output-format=full
exclude: ^source/tools/webservices/
- id: ruff-format
args:
- --check
- --target-version
- py311

54
ruff.toml Normal file
View File

@ -0,0 +1,54 @@
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"