|
| 1 | +[tool.ruff] |
| 2 | +line-length = 120 |
| 3 | +target-version = "py310" |
| 4 | + |
| 5 | +[tool.ruff.lint] |
| 6 | +select = [ |
| 7 | + "F", # Pyflakes |
| 8 | + "E", # pycodestyle errors |
| 9 | + "W", # pycodestyle warnings |
| 10 | + "C90", # mccabe complexity |
| 11 | + "I", # isort |
| 12 | + "N", # pep8-naming |
| 13 | + "UP", # pyupgrade |
| 14 | + "ANN", # flake8-annotations |
| 15 | + "ASYNC", # flake8-async |
| 16 | + "S", # flake8-bandit |
| 17 | + "BLE", # flake8-blind-except |
| 18 | + "B", # flake8-bugbear |
| 19 | + "A", # flake8-builtins |
| 20 | + "C4", # flake8-comprehensions |
| 21 | + "DTZ", # flake8-datetimez |
| 22 | + "T10", # flake8-debugger |
| 23 | + "EM", # flake8-errmsg |
| 24 | + "ISC", # flake8-implicit-str-concat |
| 25 | + "ICN", # flake8-import-conventions |
| 26 | + "G", # flake8-logging-format |
| 27 | + "PIE", # flake8-pie |
| 28 | + "T20", # flake8-print |
| 29 | + "PT", # flake8-pytest-style |
| 30 | + "Q", # flake8-quotes |
| 31 | + "RSE", # flake8-raise |
| 32 | + "RET", # flake8-return |
| 33 | + "SIM", # flake8-simplify |
| 34 | + "TID", # flake8-tidy-imports |
| 35 | + "ARG", # flake8-unused-arguments |
| 36 | + "PTH", # flake8-use-pathlib |
| 37 | + "ERA", # eradicate |
| 38 | + "PL", # Pylint |
| 39 | + "PERF", # Perflint |
| 40 | + "RUF", # Ruff-specific rules |
| 41 | +] |
| 42 | +ignore = [ |
| 43 | + "D203", # one-blank-line-before-class (conflicts with D211) |
| 44 | + "D213", # multi-line-summary-second-line (conflicts with D212) |
| 45 | + "T201", # print statement used |
| 46 | + "PLR2004", # constant variable |
| 47 | +] |
| 48 | + |
| 49 | +[tool.ruff.lint.per-file-ignores] |
| 50 | +"**/__init__.py" = ["D104"] # missing docstring in public package |
| 51 | +"**/test_*.py" = ["S101", "D"] # allow assert in tests, skip docstrings |
| 52 | +"**/tests/**/*.py" = ["S101", "D"] # allow assert in tests, skip docstrings |
| 53 | + |
| 54 | +[tool.ruff.lint.pydocstyle] |
| 55 | +convention = "google" |
| 56 | + |
| 57 | +[tool.ruff.lint.mccabe] |
| 58 | +max-complexity = 10 |
| 59 | + |
| 60 | +[tool.ruff.lint.isort] |
| 61 | +known-first-party = ["scenarios"] |
0 commit comments