File
Blob: ruff.toml
| 1 | target-version = "py312" |
| 2 | |
| 3 | [lint] |
| 4 | select = [ |
| 5 | "B0", # bugbear (all B0* checks enabled by default) |
| 6 | "B904", # bugbear (Within an except clause, raise exceptions with raise ... from err) |
| 7 | "B905", # bugbear (zip() without an explicit strict= parameter set.) |
| 8 | "E", # pycodestyles |
| 9 | "W", # pycodestyles |
| 10 | "F", # pyflakes |
| 11 | "FURB", # refurb |
| 12 | "I", # isort |
| 13 | "PERF", # Perflint |
| 14 | "PGH", # pygrep-hooks |
| 15 | "PLC", # pylint conventions |
| 16 | "PLE", # pylint errors |
| 17 | "PLR", # pylint refactor |
| 18 | "PTH", # Use pathlib |
| 19 | "RUF", # Ruff rules |
| 20 | "TRY", # Exception related lints |
| 21 | "UP", # pyupgrade |
| 22 | ] |
| 23 | ignore = [ |
| 24 | "E402", # module import not at top of file |
| 25 | "E501", # line too long |
| 26 | "PLR0912", # too many branches |
| 27 | "PLR0915", # too many statements |
| 28 | "PLR2004", # Magic value used in comparison |
| 29 | "TRY003", # Avoid specifying long messages outside the exception class |
| 30 | "UP038", # Use X | Y in isinstance check instead of (X, Y) |
| 31 | "PLR0911", # too many return statements |
| 32 | "PLC0415", # `import` should be at the top-level of a file |
| 33 | ] |
| 34 | |
| 35 | [lint.per-file-ignores] |
| 36 | # Want to preserve compatibility for old Python versions in tools directory so |
| 37 | # disable pyupgrade. Oldest supported version is currently 3.9. |
| 38 | "tools/*" = ["UP"] |