Files
2026-02-04 10:29:23 -08:00

73 lines
1.7 KiB
TOML

[tool.ruff]
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",
"libs/file_enrichment_modules/file_enrichment_modules/office_doc/office2john.py",
"projects/jupyter/jupyter_config.py",
]
line-length = 120
indent-width = 4
target-version = "py313"
[tool.ruff.lint]
fixable = ["ALL"]
unfixable = ["B"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
extend-select = [
"I", # isort, added per instructions in the VS code extension (https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
"NPY", # numpy-specific rules
"A", # flake8-builtins
"TC001", # Move application-only imports into TYPE_CHECKING block
"TC002", # Move third-party imports into TYPE_CHECKING block
"TC003", # Move standard library imports into TYPE_CHECKING block
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # cyclomatic complexity. TODO: enable later
"W191", # indentation contains tabs
"F722", # syntax error in forward annotation
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
# TODO: Enable this later and address problems
#[tool.ruff.lint.mccabe]
#max-complexity = 20