[tool.ruff] # Enable flake8-bugbear (`B`) rules. select = ["E", "F", "B", "I", "W"] # Exclude a variety of commonly ignored directories. exclude = [ ".git", ".ruff_cache", ".venv", ".env", "venv", "env", "__pypackages__", "dist", "build", "alembic", ] # Same as Black. line-length = 88 # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 [tool.ruff.isort] known-third-party = ["fastapi", "pydantic", "sqlalchemy"]