Last active
June 20, 2025 18:18
-
-
Save marcusadair/78f7dea4b53be58efcc7f3e995820f25 to your computer and use it in GitHub Desktop.
Ruff config for high value and low nag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #r4 | |
| target-version = "py311" | |
| line-length = 88 | |
| indent-width = 4 | |
| respect-gitignore = true | |
| show-fixes = true | |
| output-format = "concise" | |
| preview = true | |
| [lint] | |
| # Rules: https://docs.astral.sh/ruff/rules/ | |
| explicit-preview-rules = true # no previews by default | |
| select = [ | |
| # aye-philosophy: show bugs and better ways | |
| # nay-philosophy: style and noise, eoflines | |
| "E4", "E7", "E9", "F", "W292", "W391", | |
| # refurb numpyrules pandasvet perflint pygrep pylint pylint ruff flk8tc pyupgrade | |
| "FURB", "NPY", "PD", "PERF", "PGH", "PLE", "PLW", "RUF", "TC", "UP", | |
| ] | |
| ignore = [ | |
| # noisy+trivial: | |
| # whitespace, oneliners, imports | |
| "E252", "E301", "E401", "E701", "E702", "F401", | |
| # naggie+overeach | |
| "FURB101", "FURB103", "FURB145", "PD901", "RUF001", "RUF002", "RUF022", "RUF023", | |
| "FURB140", # naggie, and starmap is slower after 312 | |
| "PLW2901", # for-loop overwritten, TODO evaluate more, seems quite excessive | |
| "TC006", # wtflol, no we don't need to quote type arguments to cast | |
| ] | |
| fixable = ["ALL"] # allow fix for all enabled rules (when `--fix`) is provided | |
| unfixable = [ | |
| "E501" # reformat intentionally instead | |
| ] | |
| dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" # allow unused vars with underscore prefix | |
| [format] | |
| exclude = ['.pynb'] # selectively include notebooks instead | |
| docstring-code-format = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment