target-version = "py310"
line-length = 120
output-format = "concise"

[lint]
exclude = [
    "tests/fixtures/*.py",
]
select = ["ALL"]
ignore = [
    "A001",  # Variable is shadowing a Python builtin
    "ANN204",  # Missing return type annotation for special method __str__
    "ANN401",  # Dynamically typed expressions (typing.Any) are disallowed
    "ARG005",  # Unused lambda argument
    "C901",  # Too complex
    "D105",  # Missing docstring in magic method
    "D417",  # Missing argument description in the docstring
    "E501",  # Line too long
    "EM101",  # String literal when raising exception
    "EM102",  # f-string when raising exception
    "ERA001",  # Commented out code
    "FIX",  # TODO, FIXME, etc.
    "G004",  # Logging statement uses f-string
    "PLR0911",  # Too many return statements
    "PLR0912",  # Too many branches
    "PLR0913",  # Too many arguments to function call
    "PLR0915",  # Too many statements
    "SLF001", # Private member accessed
    "S704", # Unsafe use of `markupsafe.Markup`
    "TD002",  # Missing author in TODO
    "TD003",  # Missing issue link for TODO
    "TRY003",  # Avoid specifying long messages outside the exception class
]

[lint.per-file-ignores]
"src/**/cli.py" = [
    "T201",  # Print statement
]
"src/*/debug.py" = [
    "T201",  # Print statement
]
"!src/*/*.py" = [
    "D100",  # Missing docstring in public module
]
"!src/**.py" = [
    "D101",  # Missing docstring in public class
    "D103",  # Missing docstring in public function
]
"scripts/*.py" = [
    "INP001",  # File is part of an implicit namespace package
    "T201",  # Print statement
]
"tests/**.py" = [
    "ARG005",  # Unused lambda argument
    "FBT001",  # Boolean positional arg in function definition
    "PLR2004",  # Magic value used in comparison
    "S101",  # Use of assert detected
]

[lint.flake8-quotes]
docstring-quotes = "double"

[lint.flake8-tidy-imports]
ban-relative-imports = "all"

[lint.isort]
known-first-party = ["mkdocstrings"]

[lint.pydocstyle]
convention = "google"

[format]
exclude = [
    "tests/fixtures/*.py",
]
docstring-code-format = true
docstring-code-line-length = 80
