ruff.tomlā¢1.25 kB
[tool.ruff]
# 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",
"test_imports.py", # Exclude our test file from linting
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.14+
target-version = "py314"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E4", # pycodestyle errors
"E7", # pycodestyle errors
"E9", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
]
ignore = [
"E501", # line too long, handled by black
"W503", # line break before binary operator
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"