|
| 1 | +[tool.ruff] |
| 2 | +select = [ |
| 3 | + "A", # flake8-builtins |
| 4 | + "ARG", # flake8-unused-arguments |
| 5 | + "B", # flake8-bugbear |
| 6 | + "C4", # flake8-comprehensions |
| 7 | + "C90", # McCabe cyclomatic complexity |
| 8 | + "DTZ", # flake8-datetimez |
| 9 | + "E", # pycodestyle |
| 10 | + "EXE", # flake8-executable |
| 11 | + "F", # Pyflakes |
| 12 | + "G", # flake8-logging-format |
| 13 | + "I", # isort |
| 14 | + "ICN", # flake8-import-conventions |
| 15 | + "INP", # flake8-no-pep420 |
| 16 | + "INT", # flake8-gettext |
| 17 | + "ISC", # flake8-implicit-str-concat |
| 18 | + "N", # pep8-naming |
| 19 | + "PGH", # pygrep-hooks |
| 20 | + "PIE", # flake8-pie |
| 21 | + "PL", # Pylint |
| 22 | + "PT", # flake8-pytest-style |
| 23 | + "PTH", # flake8-use-pathlib |
| 24 | + "PYI", # flake8-pyi |
| 25 | + "RET", # flake8-return |
| 26 | + "RSE", # flake8-raise |
| 27 | + "RUF", # Ruff-specific rules |
| 28 | + "S", # flake8-bandit |
| 29 | + "T10", # flake8-debugger |
| 30 | + "TCH", # flake8-type-checking |
| 31 | + "TID", # flake8-tidy-imports |
| 32 | + "UP", # pyupgrade |
| 33 | + "W", # pycodestyle |
| 34 | + "YTT", # flake8-2020 |
| 35 | + # "ANN", # flake8-annotations |
| 36 | + # "BLE", # flake8-blind-except |
| 37 | + # "COM", # flake8-commas |
| 38 | + # "D", # pydocstyle |
| 39 | + # "DJ", # flake8-django |
| 40 | + # "EM", # flake8-errmsg |
| 41 | + # "ERA", # eradicate |
| 42 | + # "FBT", # flake8-boolean-trap |
| 43 | + # "NPY", # NumPy-specific rules |
| 44 | + # "PD", # pandas-vet |
| 45 | + # "Q", # flake8-quotes |
| 46 | + # "SIM", # flake8-simplify |
| 47 | + # "SLF", # flake8-self |
| 48 | + # "T20", # flake8-print |
| 49 | + # "TRY", # tryceratops |
| 50 | +] |
| 51 | +# When removing rules from the `ignore` list, do `ruff rule ARG002` to see the docs |
| 52 | +ignore = [ |
| 53 | + "ARG002", |
| 54 | + "B007", |
| 55 | + "B904", |
| 56 | + "E722", |
| 57 | + "N811", |
| 58 | + "N818", |
| 59 | + "PIE790", |
| 60 | + "PLR5501", |
| 61 | + "PTH122", |
| 62 | + "PTH123", |
| 63 | + "S110", |
| 64 | +] |
| 65 | +line-length = 79 |
| 66 | +target-version = "py37" |
| 67 | + |
| 68 | +[tool.ruff.mccabe] |
| 69 | +max-complexity = 31 |
| 70 | + |
| 71 | +[tool.ruff.pylint] |
| 72 | +allow-magic-value-types = ["int", "str"] |
| 73 | +max-args = 12 |
| 74 | +max-branches = 41 |
| 75 | +max-statements = 95 |
| 76 | + |
| 77 | +[tool.ruff.per-file-ignores] |
| 78 | +"docs/make.py" = ["INP001"] |
| 79 | +"tests/*" = ["B023", "I001", "N8", "PGH004", "PLR0915", "PT009", "S101"] |
| 80 | +"tests/mock_pg.py" = ["RET505"] |
0 commit comments