# Tool configurations
[tool.ruff]
target-version = "{{ python_version_info.ruff_target }}"
line-length = 88
lint.extend-select = [
    "A",    # flake8-builtins
    "ARG",  # flake8-unused-arguments
    "B",    # flake8-bugbear
    "C",    # flake8-comprehensions
    "DTZ",  # flake8-datetimez
    "E",    # pycodestyle errors
    "EM",   # flake8-errmsg
    "F",    # pyflakes
    "FBT",  # flake8-boolean-trap
    "I",    # isort
    "ICN",  # flake8-import-conventions
    "ISC",  # flake8-implicit-str-concat
    "N",    # pep8-naming
    "PLC",  # pylint convention
    "PLE",  # pylint error
    "PLR",  # pylint refactor
    "PLW",  # pylint warning
    "Q",    # flake8-quotes
    "RUF",  # Ruff-specific rules
    "S",    # flake8-bandit
    "T",    # flake8-print
    "TID",  # flake8-tidy-imports
    "UP",   # pyupgrade
    "W",    # pycodestyle warnings
    "YTT",  # flake8-2020
]
lint.ignore = [
    "ARG001", # Unused function argument
    "E501",   # Line too long
    "I001",
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"

[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]  # Allow assert in tests

[tool.mypy]
python_version = "{{ python_version_info.mypy_version }}"
# Type checking
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
strict_optional = true

# Error reporting
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
show_error_codes = true
pretty = true

# Import discovery
ignore_missing_imports = false
follow_imports = "normal"
follow_imports_for_stubs = true

# Advanced
strict_equality = true
extra_checks = true

{% if is_plugin_host or is_plugin %}
plugins = ["pydantic.mypy"]

[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
{% endif %} 