Skip to content

Commit

Permalink
Add pyproject for linting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fk3 committed Oct 19, 2023
1 parent 8fbb66c commit 24a913f
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[tool.ruff]
line-length = 120
src = ["./src/*/"]
select = [
"F",
"E", "W",
"C90",
"I",
"N",
"D",
"UP",
"YTT",
"ANN",
"ASYNC",
"S",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"EM",
"FA",
"ISC",
"ICN",
"G",
"INP",
"PIE",
"T20",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SIM",
"TID",
"INT",
"ARG",
"PTH",
"TD",
"ERA",
"PD",
"PL",
"FLY",
"NPY",
"RUF",
]
ignore = [
"ANN101", "ANN102",
"D203", "D213", "D406", "D407",
"G004", # logging does not have any built-in keyword string interpolation for the message itself, falling back to %s etc. is crap
"UP015", # open mode should be clearly stated, explicit is better than implicit
]

[tool.ruff.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"tests/*" = ["S101", "SLF001", "INP001"] # Tests should use assert, are allowed to test private internals, and aren't a package

[tool.black]
line-length = 120

[tool.mypy]
strict = true
explicit_package_bases = true
mypy_path = "./src/*/"
exclude = [
]
follow_imports = "silent"

0 comments on commit 24a913f

Please sign in to comment.