[tool.ruff] # Exclude a variety of commonly ignored directories. exclude = [ ".git", ".ruff_cache", "__pypackages__", "dist", "venv", ".venv", "env", ] # Same as Black. line-length = 88 # Assume Python 3.8 target-version = "py38" [tool.ruff.lint] # Enable flake8-bugbear (`B`) rules. select = ["E", "F", "B", "I"] # Allow unused variables when underscore-prefixed. 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", "alembic"] [tool.ruff.lint.per-file-ignores] # Ignore unused imports in __init__.py files "__init__.py" = ["F401"]