🚨 Add linter
This commit is contained in:
parent
97d04be759
commit
6c752be00e
@ -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
54
ruff.toml
Normal 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"
|
Loading…
Reference in New Issue
Block a user