Skip to content

Instantly share code, notes, and snippets.

@ialarmedalien
Created October 21, 2025 17:33
Show Gist options
  • Select an option

  • Save ialarmedalien/ef54fa60df527f9d204c28df71e30d8a to your computer and use it in GitHub Desktop.

Select an option

Save ialarmedalien/ef54fa60df527f9d204c28df71e30d8a to your computer and use it in GitHub Desktop.
ruff linter config with just about everything enabled
# https://docs.astral.sh/ruff/rules/
# updated 21 Oct 2025
[tool.ruff]
force-exclude = true
line-length = 120
# Assume Python 3.10
target-version = "py310"
[tool.ruff.lint]
select = [
"AIR", # Airflow
"ERA", # eradicate
"FAST", # FastAPI
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
# "COM", # flake8-commas
"C4", # flake8-comprehensions
"CPY", # flake8-copyright
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FIX", # flake8-fixme
"FA", # flake8-future-annotations
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TID", # flake8-tidy-imports
"TD", # flake8-todos
"TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FLY", # flynt
"I", # isort
"C90", # mccabe
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"N", # pep8-naming
"PERF", # Perflint
"E", # pycodestyle - error
"W", # pycodestyle - warning
"DOC", # pydoclint
"D", # pydocstyle
"F", # Pyflakes
"PGH", # pygrep-hooks
"PL", # Pylint
"PLC", # pylint: Convention
"PLE", # pylint: Error
"PLR", # pylint: Refactor
"PLW", # pylint: Warning
"UP", # pyupgrade
"FURB", # refurb
"RUF", # Ruff-specific rules
"TRY", # tryceratops
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# D203: one-blank-line-before-class (conflicts with D211)
# D212: multi-line-summary-first-line (conflicts with D213)
# E203: whitespace before ',', ';', or ':'
# E501: line length
# ISC001: conflicts with Ruff's formatter
# FBT001, FBT002: booleans as arguments
ignore = [
"D203",
"D213",
"E203",
"E501",
"ISC001",
"FBT001",
"FBT002"
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101"] # use of assert in tests
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 15.
max-complexity = 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment