-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pyproject for linting configuration
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |