dotfiles/.config/ruff/pyproject.toml
Trysdyn Black 651a2da9be Update helix/ruff confs
- Support autoformatting Javascript in Helix
- Update Ruff to use modern config idioms
2024-10-08 13:27:57 -07:00

55 lines
1.8 KiB
TOML

[tool.ruff]
line-length = 120
indent-width = 4
# We preview to grab a few rules like PLW1514
# Might be smarter to do explicit-preview-rules...
preview = true
# Dismissed selections:
# - CPY: Copyright notice screamer; I don't care
# - TD: Overly opinionated on FIXME/TODO format. FIX covers better
lint.select = [
"ANN", # enforce type annotations
"A", # prevent using keywords that clobber python builtins
"ARG", # argument usage checking
"B", # bugbear: security warnings
"C4", # generator usage
"C90", # mccabe code complexity
"COM", # comma usage
"D", # pydocstyle
"DTZ", # datetimez sanity
"E", # pycodestyle errors
"EM", # error message handling
"F", # pyflakes - should be enabled but make explicit
"ERA", # commented code screamer
"FBT", # boolean traps
"FIX", # fixme screamer
"F", # pyflakes
"G", # logging handling
"I", # isort
"ISC", # implicit string concatenation
"PIE", # pie stuff
"PL", # pylint rules
"PTH", # pathlib usage
"Q", # quote handling
"RET", # return handling
"RUF", # the ruff developer's own rules
"SIM", # simplification options
"UP", # alert you when better syntax is available in your python version
"W", # pycodestyle warnings
]
lint.ignore = [
"ANN101", # No type hint for "self" - not necessary and makes noisy code
"D203", # Blank line required before class docstring - conflicts with ruff's own formatter
"D211", # No line before class, incompatible with D203 - one line before class
"D212", # Summary on first line; incompatible with D213 - summary on second line
"D400" # Summary should end with period - duplicates D415 - summary ends with punctuation
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false