[tool.ruff] # 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", ] # Same as Black line-length = 88 # Assume Python 3.10 target-version = "py310" [tool.ruff.lint] # Enable pycodestyle (E), Pyflakes (F), isort (I), and various other linters select = ["E", "F", "I", "N", "B", "A", "COM", "C4", "UP", "W"] ignore = ["E501"] # Ignore line too long errors # Allow autofix for all enabled rules fixable = ["ALL"] unfixable = [] # 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", "google"]