|
| 1 | +[tool.ruff] |
| 2 | +output-format = "grouped" |
| 3 | +line-length = 120 |
| 4 | +target-version = "py37" |
| 5 | +extend-exclude = [ |
| 6 | + "newrelic/packages/", |
| 7 | + "setup.py", |
| 8 | +] |
| 9 | +namespace-packages = ["testing_support"] |
| 10 | + |
| 11 | +[tool.ruff.format] |
| 12 | +skip-magic-trailing-comma = true |
| 13 | + |
| 14 | +[tool.ruff.lint] |
| 15 | +isort.split-on-trailing-comma=false |
| 16 | +select = [ |
| 17 | + # Enabled linters and rules |
| 18 | + "F", # Pyflakes |
| 19 | + "E", # pycodestyle |
| 20 | + "W", # pycodestyle |
| 21 | + "I", # isort |
| 22 | + "N", # pep8-naming |
| 23 | + "D", # pydocstyle |
| 24 | + "UP", # pyupgrade |
| 25 | + "YTT", # flake8-2020 |
| 26 | + "ANN", # flake8-annotations |
| 27 | + "ASYNC", # flake8-async |
| 28 | + "S", # flake8-bandit |
| 29 | + "BLE", # flake8-blind-except |
| 30 | + "FBT", # flake8-boolean-trap |
| 31 | + "B", # flake8-bugbear |
| 32 | + "A", # flake8-builtins |
| 33 | + "COM", # flake8-commas |
| 34 | + "C4", # flake8-comprehensions |
| 35 | + "T10", # flake8-debugger |
| 36 | + "EM", # flake8-errmsg |
| 37 | + "FA", # flake8-future-annotations |
| 38 | + "ISC", # flake8-implicit-str-concat |
| 39 | + "ICN", # flake8-import-conventions |
| 40 | + "LOG", # flake8-logging |
| 41 | + "G", # flake8-logging-format |
| 42 | + "INP", # flake8-no-pep420 |
| 43 | + "PYI", # flake8-pyi |
| 44 | + "PT", # flake8-pytest-style |
| 45 | + "Q", # flake8-quotes |
| 46 | + "RSE", # flake8-raise |
| 47 | + "RET", # flake8-return |
| 48 | + "SLF", # flake8-self |
| 49 | + "SLOT", # flake8-slots |
| 50 | + "SIM", # flake8-simplify |
| 51 | + "TID", # flake8-tidy-imports |
| 52 | + "INT", # flake8-gettext |
| 53 | + "ARG", # flake8-unused-arguments |
| 54 | + "PTH", # flake8-use-pathlib |
| 55 | + "PGH", # pygrep-hooks |
| 56 | + "PL", # Pylint |
| 57 | + "TRY", # tryceratops |
| 58 | + "FLY", # flynt |
| 59 | + "PERF", # Perflint |
| 60 | + "FURB", # refurb |
| 61 | + "RUF", # Ruff-specific rules |
| 62 | +] |
| 63 | + |
| 64 | +# Disabled Linters |
| 65 | +# "C90", # mccabe |
| 66 | +# "CPY", # flake8-copyright |
| 67 | +# "DTZ", # flake8-datetimez |
| 68 | +# "DJ", # flake8-django |
| 69 | +# "EXE", # flake8-executable |
| 70 | +# "PIE", # flake8-pie |
| 71 | +# "T20", # flake8-print |
| 72 | +# "TC", # flake8-type-checking |
| 73 | +# "TD", # flake8-todos |
| 74 | +# "FIX", # flake8-fixme |
| 75 | +# "ERA", # eradicate |
| 76 | +# "PD", # pandas-vet |
| 77 | +# "NPY", # NumPy-specific rules |
| 78 | +# "FAST", # FastAPI |
| 79 | +# "AIR", # Airflow |
| 80 | +# "DOC", # pydoclint |
| 81 | + |
| 82 | +ignore = [ |
| 83 | + # Ruff recommended linter rules to disable when using formatter |
| 84 | + "W191", # tab-indentation |
| 85 | + "E111", # indentation-with-invalid-multiple |
| 86 | + "E114", # indentation-with-invalid-multiple-comment |
| 87 | + "E117", # over-indented |
| 88 | + "D206", # docstring-tab-indentation |
| 89 | + "D300", # triple-single-quotes |
| 90 | + "Q000", # bad-quotes-inline-string |
| 91 | + "Q001", # bad-quotes-multiline-string |
| 92 | + "Q002", # bad-quotes-docstring |
| 93 | + "Q003", # avoidable-escaped-quote |
| 94 | + "COM812", # missing-trailing-comma |
| 95 | + "COM819", # prohibited-trailing-comma |
| 96 | + # Additional disabled rules |
| 97 | + "D203", # incorrect-blank-line-before-class |
| 98 | + "D213", # multi-line-summary-second-line |
| 99 | +] |
| 100 | + |
| 101 | +[tool.ruff.lint.per-file-ignores] |
| 102 | +"conftest.py" = ["F401"] |
| 103 | + |
| 104 | +# Alternate linters and formatters |
1 | 105 | [tool.black]
|
2 | 106 | line-length = 120
|
3 | 107 | include = '\.pyi?$'
|
|
0 commit comments