[tool.ruff] line-length = 100 target-version = "py310" # Exclude directories and files from linting exclude = [ ".git", ".github", ".mypy_cache", ".ruff_cache", ".venv", "venv", "__pycache__", "migrations/versions", ] [tool.ruff.lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) select = ["E", "F", "I", "W", "N", "D", "UP", "B", "C4", "SIM", "ERA"] ignore = [ "E501", # Line length is already enforced by the formatter "D100", # Missing docstring in public module "D104", # Missing docstring in public package "D200", # One-line docstring should fit on one line "D400", # First line should end with a period "D415", # First line should end with a period, question mark, or exclamation point "ERA001", # Found commented-out code "E402", # Module level import not at top of file "B008", # Do not perform function call in argument defaults ] # Allow fix 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.lint.mccabe] # Flag any methods with a complexity higher than 10. max-complexity = 10 [tool.ruff.lint.isort] known-third-party = ["fastapi", "pydantic", "sqlalchemy", "jose", "passlib", "alembic"]