| 1 |
target-version = "py39" |
| 2 |
line-length = 120 |
| 3 |
|
| 4 |
[lint] |
| 5 |
exclude = [ |
| 6 |
"tests/fixtures/*.py", |
| 7 |
] |
| 8 |
select = [ |
| 9 |
"A", "ANN", "ARG", |
| 10 |
"B", "BLE", |
| 11 |
"C", "C4", |
| 12 |
"COM", |
| 13 |
"D", "DTZ", |
| 14 |
"E", "ERA", "EXE", |
| 15 |
"F", "FBT", |
| 16 |
"G", |
| 17 |
"I", "ICN", "INP", "ISC", |
| 18 |
"N", |
| 19 |
"PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI", |
| 20 |
"Q", |
| 21 |
"RUF", "RSE", "RET", |
| 22 |
"S", "SIM", "SLF", |
| 23 |
"T", "T10", "T20", "TCH", "TID", "TRY", |
| 24 |
"UP", |
| 25 |
"W", |
| 26 |
"YTT", |
| 27 |
] |
| 28 |
ignore = [ |
| 29 |
"A001", # Variable is shadowing a Python builtin |
| 30 |
"ANN101", # Missing type annotation for self |
| 31 |
"ANN102", # Missing type annotation for cls |
| 32 |
"ANN204", # Missing return type annotation for special method __str__ |
| 33 |
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed |
| 34 |
"ARG005", # Unused lambda argument |
| 35 |
"C901", # Too complex |
| 36 |
"D105", # Missing docstring in magic method |
| 37 |
"D417", # Missing argument description in the docstring |
| 38 |
"E501", # Line too long |
| 39 |
"ERA001", # Commented out code |
| 40 |
"G004", # Logging statement uses f-string |
| 41 |
"PLR0911", # Too many return statements |
| 42 |
"PLR0912", # Too many branches |
| 43 |
"PLR0913", # Too many arguments to function call |
| 44 |
"PLR0915", # Too many statements |
| 45 |
"SLF001", # Private member accessed |
| 46 |
"TRY003", # Avoid specifying long messages outside the exception class |
| 47 |
] |
| 48 |
|
| 49 |
[lint.per-file-ignores] |
| 50 |
"src/**/cli.py" = [ |
| 51 |
"T201", # Print statement |
| 52 |
] |
| 53 |
"src/*/debug.py" = [ |
| 54 |
"T201", # Print statement |
| 55 |
] |
| 56 |
"!src/*/*.py" = [ |
| 57 |
"D100", # Missing docstring in public module |
| 58 |
] |
| 59 |
"!src/**.py" = [ |
| 60 |
"D101", # Missing docstring in public class |
| 61 |
"D103", # Missing docstring in public function |
| 62 |
] |
| 63 |
"scripts/*.py" = [ |
| 64 |
"INP001", # File is part of an implicit namespace package |
| 65 |
"T201", # Print statement |
| 66 |
] |
| 67 |
"tests/**.py" = [ |
| 68 |
"ARG005", # Unused lambda argument |
| 69 |
"D103", # Missing docstring in public function |
| 70 |
"FBT001", # Boolean positional arg in function definition |
| 71 |
"PLR2004", # Magic value used in comparison |
| 72 |
"S101", # Use of assert detected |
| 73 |
] |
| 74 |
|
| 75 |
[lint.flake8-quotes] |
| 76 |
docstring-quotes = "double" |
| 77 |
|
| 78 |
[lint.flake8-tidy-imports] |
| 79 |
ban-relative-imports = "all" |
| 80 |
|
| 81 |
[lint.isort] |
| 82 |
known-first-party = ["pytkdocs"] |
| 83 |
|
| 84 |
[lint.pydocstyle] |
| 85 |
convention = "google" |
| 86 |
|
| 87 |
[format] |
| 88 |
exclude = [ |
| 89 |
"tests/fixtures/*.py", |
| 90 |
] |
| 91 |
docstring-code-format = true |
| 92 |
docstring-code-line-length = 80 |