[tool.ruff] # Enable flake8-bugbear (`B`) rules. line-length = 88 target-version = "py310" [tool.ruff.lint] select = ["E", "F", "B", "I"] # Exclude a variety of commonly ignored directories. exclude = [ ".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv", ] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # Ignore certain errors in migrations extend-ignore = [ "E501", # Line too long (migrations can have long lines) "B008", # Do not perform function call in argument defaults (common in FastAPI) ] [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", "uvicorn"]