| 1 |
target-version = "py310" |
| 2 |
line-length = 120 |
| 3 |
output-format = "concise" |
| 4 |
|
| 5 |
[lint] |
| 6 |
exclude = [ |
| 7 |
"tests/fixtures/*.py", |
| 8 |
] |
| 9 |
select = ["ALL"] |
| 10 |
ignore = [ |
| 11 |
"A001", # Variable is shadowing a Python builtin |
| 12 |
"ANN204", # Missing return type annotation for special method __str__ |
| 13 |
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed |
| 14 |
"ARG005", # Unused lambda argument |
| 15 |
"C901", # Too complex |
| 16 |
"D105", # Missing docstring in magic method |
| 17 |
"D417", # Missing argument description in the docstring |
| 18 |
"E501", # Line too long |
| 19 |
"EM101", # String literal when raising exception |
| 20 |
"EM102", # f-string when raising exception |
| 21 |
"ERA001", # Commented out code |
| 22 |
"FIX", # TODO, FIXME, etc. |
| 23 |
"G004", # Logging statement uses f-string |
| 24 |
"PLR0911", # Too many return statements |
| 25 |
"PLR0912", # Too many branches |
| 26 |
"PLR0913", # Too many arguments to function call |
| 27 |
"PLR0915", # Too many statements |
| 28 |
"SLF001", # Private member accessed |
| 29 |
"S704", # Unsafe use of `markupsafe.Markup` |
| 30 |
"TD002", # Missing author in TODO |
| 31 |
"TD003", # Missing issue link for TODO |
| 32 |
"TRY003", # Avoid specifying long messages outside the exception class |
| 33 |
] |
| 34 |
|
| 35 |
[lint.per-file-ignores] |
| 36 |
"src/**/cli.py" = [ |
| 37 |
"T201", # Print statement |
| 38 |
] |
| 39 |
"src/*/debug.py" = [ |
| 40 |
"T201", # Print statement |
| 41 |
] |
| 42 |
"!src/*/*.py" = [ |
| 43 |
"D100", # Missing docstring in public module |
| 44 |
] |
| 45 |
"!src/**.py" = [ |
| 46 |
"D101", # Missing docstring in public class |
| 47 |
"D103", # Missing docstring in public function |
| 48 |
] |
| 49 |
"scripts/*.py" = [ |
| 50 |
"INP001", # File is part of an implicit namespace package |
| 51 |
"T201", # Print statement |
| 52 |
] |
| 53 |
"tests/**.py" = [ |
| 54 |
"ARG005", # Unused lambda argument |
| 55 |
"FBT001", # Boolean positional arg in function definition |
| 56 |
"PLR2004", # Magic value used in comparison |
| 57 |
"S101", # Use of assert detected |
| 58 |
] |
| 59 |
|
| 60 |
[lint.flake8-quotes] |
| 61 |
docstring-quotes = "double" |
| 62 |
|
| 63 |
[lint.flake8-tidy-imports] |
| 64 |
ban-relative-imports = "all" |
| 65 |
|
| 66 |
[lint.isort] |
| 67 |
known-first-party = ["mkdocstrings"] |
| 68 |
|
| 69 |
[lint.pydocstyle] |
| 70 |
convention = "google" |
| 71 |
|
| 72 |
[format] |
| 73 |
exclude = [ |
| 74 |
"tests/fixtures/*.py", |
| 75 |
] |
| 76 |
docstring-code-format = true |
| 77 |
docstring-code-line-length = 80 |