# Ruff Python linter configuration
# https://docs.astral.sh/ruff/settings/

line-length = 100
target-version = "py311"

# Check all Python files in the repository
include = [
    "cronjobs/**/*.py",
    "skills/**/*.py",
    "tests/**/*.py",
]

# Exclude bash scripts, generated files, and caches
exclude = [
    "cronjobs/**/*.sh",
    "**/__pycache__/**",
    "**/.git/**",
]

[lint]
# Enable rules that align with common Python best practices
select = [
    "E",     # pycodestyle errors
    "F",     # pyflakes
    "W",     # pycodestyle warnings
    "I",     # isort
    "UP",    # pyupgrade
    "ANN",   # type annotations (requires numpy or stubs, use carefully)
]

# Ignore rules that are too strict or not relevant for this project
ignore = [
    "E501",   # line too long (handled by formatter if needed)
    "W291",   # trailing whitespace (not a code quality issue)
    "W293",   # blank line with whitespace (not a code quality issue)
]

[lint.per-file-ignores]
# Allow type annotation relaxations in test files
"tests/*" = ["E501", "ANN"]
"*_test.py" = ["E501", "ANN"]
# Allow re-exports and side-effects in __init__.py files
"**/__init__.py" = ["F401"]
# Allow ' Any' usage in cronjobs (gradual typing)
"cronjobs/**/*.py" = ["ANN401"]

[lint.isort]
# Known first-party modules
known-first-party = ["cronjobs"]

[lint.pydocstyle]
# Convention: Google-style docstrings
convention = "google"
