|
| 1 | +fix = true |
| 2 | +line-length = 120 |
| 3 | + |
| 4 | +[format] |
| 5 | +# preview = true |
| 6 | +docstring-code-format = true |
| 7 | + |
| 8 | +# https://docs.astral.sh/ruff/linter/#rule-selection |
| 9 | +[lint] |
| 10 | +# preview = true |
| 11 | +# Enable these rules |
| 12 | +extend-select = [ |
| 13 | + "A", # flake8-builtins |
| 14 | + "ARG", # flake8-unused-arguments |
| 15 | + # "BLE", # flake8-blind-except |
| 16 | + "C4", # flake8-comprehensions |
| 17 | + "COM", # flake8-commas |
| 18 | + # "DTZ", # flake8-datetimez |
| 19 | + "E", # Error |
| 20 | + "EXE", # flake8-executable |
| 21 | + "F", # Pyflakes |
| 22 | + "I", # isort |
| 23 | + "ICN", # flake8-import-conventions |
| 24 | + "ISC", # flake8-implicit-str-concat |
| 25 | + "N", # pep8-naming |
| 26 | + "PD", # pandas-vet |
| 27 | + "PGH", # pygrep-hooks |
| 28 | + "PIE", # flake8-pie |
| 29 | + "PLC", # Pylint Convention |
| 30 | + "PLE", # Pylint Error |
| 31 | + "PLR", # Pylint Refactor |
| 32 | + "PLW", # Pylint Warning |
| 33 | + "PT", # flake8-pytest-style |
| 34 | + "Q", # flake8-quotes |
| 35 | + "RUF", # Ruff-specific rules |
| 36 | + "S", # flake8-bandit |
| 37 | + "SIM", # flake8-simplify |
| 38 | + "T10", # flake8-debugger |
| 39 | + "TID", # flake8-tidy-imports |
| 40 | + "UP", # pyupgrade |
| 41 | +] |
| 42 | +# except for these specific errors |
| 43 | +ignore = [ |
| 44 | + "E402", # module-import-not-at-top-of-file |
| 45 | + "E501", # line-too-long |
| 46 | + "E731", # lambda-assignment |
| 47 | +] |
| 48 | + |
| 49 | +[lint.per-file-ignores] |
| 50 | +"tests/test_*" = [ |
| 51 | + "S101", # assert |
| 52 | + "S311", # suspicious-non-cryptographic-random-usage |
| 53 | +] |
| 54 | + |
| 55 | +#exclude = |
| 56 | +# .tox |
| 57 | +# .eggs |
| 58 | +# build |
| 59 | +# dist |
| 60 | + |
| 61 | +[lint.pylint] |
| 62 | +# Raise the allowed limits the least possible amount https://docs.astral.sh/ruff/settings/#pylint-max-branches |
| 63 | +max-statements = 58 |
| 64 | +max-branches = 24 |
0 commit comments