# 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.8 target-version = "py38" [lint] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # Allow autofix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] # Select all rules by default (E, F, B, I, ARG, C4, ASYNC, EXE, ISC, LOG, RUF, SLF) select = ["E", "F", "B", "I", "C", "N", "RUF"] ignore = [ # Ignore B008 (function call in argument defaults) because this is a standard pattern in FastAPI "B008", # Ignore N805 (first argument of a method should be named 'self') for pydantic validators "N805", ] [format] # Like Black, use double quotes for strings. quote-style = "double" # Like Black, indent with spaces, rather than tabs. indent-style = "space" # Like Black, respect magic trailing commas. skip-magic-trailing-comma = false # Like Black, automatically detect the appropriate line ending. line-ending = "auto"