dotfiles/.config/ruff/pyproject.toml
Trysdyn Black ff2faf4e4c Configure helix and ruff
- Make helix use ruff-lsp and pyright
- Configure ruff to my specifications
- Tweak a helix theme color or two
2023-12-28 17:18:09 -08:00

50 lines
1.6 KiB
TOML

[tool.ruff]
line-length = 120
indent-width = 4
# Dismissed selections:
# - CPY: Copyright notice screamer; I don't care
# - TD: Overly opinionated on FIXME/TODO format. FIX covers better
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
]
ignore = [
"ANN101", # No type hint for "self" - not necessary and makes noisy code
"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