[tool.ruff]
target-version = "py311"
line-length = 100
exclude = [
    ".git",
    ".pytest_cache",
    "__pycache__",
    "node_modules",
    "backend/bot/app/web/templates",
]

[tool.ruff.lint]
select = [
    "E", # pycodestyle errors
    "F", # pyflakes
    "I", # isort
]
ignore = [
    "E731", # lambda assignment (common in handlers)
    "E712", # `== True` / `== False` in SQLAlchemy filters
    "E711", # `== None` on ORM columns (use `.is_(None)` in refactors)
]

[tool.ruff.lint.isort]
known-first-party = ["app_logging", "bot", "config", "db", "tests"]

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