Skip to content

Instantly share code, notes, and snippets.

@bradbeattie
Created July 9, 2025 17:55
Show Gist options
  • Save bradbeattie/0a68258614ea0f03a793396092f66234 to your computer and use it in GitHub Desktop.
Save bradbeattie/0a68258614ea0f03a793396092f66234 to your computer and use it in GitHub Desktop.
ruff.toml
target-version = "py312"
line-length = 120
[lint]
select = ["ALL"]
fixable = ["ALL"]
ignore = [
"D", # Disabling doc rules for now
"RET505", # Permitted stylistic choice
"COM812", # Handled by ruff format
"ISC001", # Handled by ruff format
"TD002", # Lax TODO requirements
"TD003", # Lax TODO requirements
"FIX002", # Lax TODO requirements
"G004", # TODO: Implement better logging later.
"TRY003",
"EM101",
"ANN401",
"UP007",
"EM102",
"FLY002",
"SIM117", # Sometimes multiline with statements are easier to read
"TRY300",
]
[lint.mccabe]
max-complexity = 15
[lint.pylint]
max-args = 7
[lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Body",
"fastapi.Cookie",
"fastapi.Depends",
"fastapi.Form",
"fastapi.Header",
"fastapi.Query",
"typer.Option",
"typer.Argument",
]
[lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["S101", "ARG001", "ANN001", "ANN201"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment