| 1 |
[build-system] |
| 2 |
requires = ["setuptools>=50.3.2", "setuptools_scm[toml]>=3.4"] |
| 3 |
build-backend = "setuptools.build_meta" |
| 4 |
|
| 5 |
[tool.setuptools_scm] |
| 6 |
write_to = "saltpylint/version.py" |
| 7 |
write_to_template = "# pylint: skip-file\n\n__version__ = \"{version}\"\n" |
| 8 |
|
| 9 |
[tool.ruff] |
| 10 |
line-length = 120 |
| 11 |
show-fixes = true |
| 12 |
output-format = "grouped" |
| 13 |
target-version = "py38" |
| 14 |
respect-gitignore = true |
| 15 |
src = [ |
| 16 |
"saltpylint", |
| 17 |
"tests", |
| 18 |
"tools", |
| 19 |
"examples", |
| 20 |
] |
| 21 |
extend-exclude = [ |
| 22 |
".nox/**", |
| 23 |
] |
| 24 |
extend-include = [ |
| 25 |
"setup.py", |
| 26 |
"noxfile.py", |
| 27 |
] |
| 28 |
builtins = [ |
| 29 |
"__opts__", |
| 30 |
"__salt__", |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
"__salt_system_encoding__", |
| 35 |
] |
| 36 |
|
| 37 |
[tool.ruff.lint] |
| 38 |
select = ["ALL"] |
| 39 |
ignore = [ |
| 40 |
|
| 41 |
"D200", |
| 42 |
"D212", |
| 43 |
"COM", |
| 44 |
"ERA", |
| 45 |
"SIM108", |
| 46 |
"PERF203", |
| 47 |
"PERF401", |
| 48 |
"PERF402", |
| 49 |
"ANN", |
| 50 |
] |
| 51 |
ignore-init-module-imports = true |
| 52 |
|
| 53 |
[tool.ruff.lint.per-file-ignores] |
| 54 |
"**/*.py" = [ |
| 55 |
"D100", |
| 56 |
"D101", |
| 57 |
"D102", |
| 58 |
"D103", |
| 59 |
"D104", |
| 60 |
"D107", |
| 61 |
"D205", |
| 62 |
"D415", |
| 63 |
"PTH", |
| 64 |
"ARG001", |
| 65 |
"ARG002", |
| 66 |
] |
| 67 |
"setup.py" = [ |
| 68 |
"D", |
| 69 |
] |
| 70 |
"noxfile.py" = [ |
| 71 |
"D", |
| 72 |
"ANN", |
| 73 |
"SLF001", |
| 74 |
"C901", |
| 75 |
"PLR0912", |
| 76 |
"DTZ005", |
| 77 |
"FBT002", |
| 78 |
"PLR0913", |
| 79 |
"PLR0915", |
| 80 |
] |
| 81 |
"saltpylint/blacklist.py" = [ |
| 82 |
"BLE001", |
| 83 |
] |
| 84 |
"saltpylint/thirdparty.py" = [ |
| 85 |
"BLE001", |
| 86 |
] |
| 87 |
"tools/**/*.py" = [ |
| 88 |
"ANN201", |
| 89 |
"D104", |
| 90 |
"FBT001", |
| 91 |
"FBT002", |
| 92 |
] |
| 93 |
"tests/**/*.py" = [ |
| 94 |
"ANN", |
| 95 |
"ARG001", |
| 96 |
"DTZ003", |
| 97 |
"PLR2004", |
| 98 |
"PT001", |
| 99 |
"PT023", |
| 100 |
"RET504", |
| 101 |
"S101", |
| 102 |
"S603", |
| 103 |
"SIM117", |
| 104 |
"TCH002", |
| 105 |
"TCH003", |
| 106 |
] |
| 107 |
|
| 108 |
[tool.ruff.lint.flake8-quotes] |
| 109 |
docstring-quotes = "double" |
| 110 |
|
| 111 |
[tool.ruff.lint.pydocstyle] |
| 112 |
|
| 113 |
convention = "google" |
| 114 |
|
| 115 |
[tool.ruff.lint.isort] |
| 116 |
combine-as-imports = false |
| 117 |
force-single-line = true |
| 118 |
known-first-party = ["src"] |
| 119 |
forced-separate = ["tests"] |
| 120 |
|
| 121 |
[tool.ruff.lint.pep8-naming] |
| 122 |
ignore-names = [ |
| 123 |
"__virtual__", |
| 124 |
] |
| 125 |
[tool.ruff.lint.pyupgrade] |
| 126 |
|
| 127 |
keep-runtime-typing = true |
| 128 |
|
| 129 |
[tool.ruff.lint.mccabe] |
| 130 |
max-complexity = 45 |
| 131 |
|
| 132 |
[tool.ruff.lint.pylint] |
| 133 |
max-branches = 45 |
| 134 |
max-returns = 10 |
| 135 |
max-statements = 100 |