53 lines
1.4 KiB
TOML

[tool.ruff]
# Enable Pyflakes (`F`), McCabe complexity (`C90`), pycodestyle (`E`),
# isort (`I`), PEP8 naming (`N`), and more
line-length = 100
target-version = "py310"
# Exclude a variety of commonly ignored directories
exclude = [
".git",
".ruff_cache",
"__pycache__",
"venv",
".env",
".venv",
"env",
"dist",
"build",
]
# Format code with black formatting style
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "D", "UP", "C90", "B", "C4", "SIM", "RET"]
# Ignore specific rules
ignore = [
"E203", # Whitespace before ':' (conflicts with black)
"E501", # Line too long (handled by formatter)
"D100", # Missing module docstring (for now)
"D101", # Missing class docstring (for now)
"D103", # Missing function docstring (for now)
"D104", # Missing package docstring (for now)
"D203", # One blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line
]
# Allow autofix for all enabled rules (when `--fix`) is provided
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.isort]
known-first-party = ["app"]
# Per-file-ignores to clean code based on functionality
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104"]
"migrations/*.py" = ["D100", "D103", "D400", "D415"]
"app/models/*.py" = ["D101"]