[tool.ruff] # Enable flake8-bugbear (`B`) rules. line-length = 88 target-version = "py38" exclude = [ ".git", ".ruff_cache", ".venv", "venv", "__pypackages__", "dist", "build", ] [tool.ruff.lint] select = ["E", "F", "B", "I"] dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.lint.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 [tool.ruff.lint.isort] known-third-party = ["fastapi", "pydantic", "sqlalchemy", "starlette"] [tool.ruff.lint.per-file-ignores] # Allow unused imports in `__init__.py` files "__init__.py" = ["F401"] # Ignore B008 in FastAPI endpoints (common pattern) "app/api/v1/endpoints/*.py" = ["B008"]