Skip to content

Instantly share code, notes, and snippets.

@Xowap
Created July 28, 2024 21:31
Show Gist options
  • Save Xowap/b4534994eb753c869425a2ccca66db44 to your computer and use it in GitHub Desktop.
Save Xowap/b4534994eb753c869425a2ccca66db44 to your computer and use it in GitHub Desktop.
Rémy's Ruff Rules
[tool.ruff.lint]
select = [
# -- Core --
"E", # pycodestyle (errors)
"W", # pycodestyle (warnings)
"F", # Pyflakes
"I", # isort
"C90", # McCabe Complexity
"D1", # Mandatory docstrings
"S", # Bandit
# -- Bonus --
"A", # flake8-bugbear
"B", # flake8-bugbear
"DTZ", # date/time zone
"T10", # debugger
"EM", # error messages
"EXE", # executable
"G", # logging
"UP", # pyupgrade
"ASYNC", # async
"INP", # PEP 420
"T20", # no print
"PT", # pytest
"SLOT", # slots
"TCH", # type checking blocks
"PTH", # Use pathlib
"FIX", # Don't allow not done stuff in code
"ERA", # Don't comment code
"RUF", # Ruff stuff
"TID251", # See below
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"requests".msg = "Use `httpx` instead, which has timeouts by default."
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"**/migrations/*" = ["ALL"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment