Debian Codegraph @

pyproject.toml

raw symbols SCIP
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 # "__context__",
32 # "__grains__",
33 # "__pillar__",
34 "__salt_system_encoding__",
35 ]
36
37 [tool.ruff.lint]
38 select = ["ALL"]
39 ignore = [
40 # D* pydocstyle
41 "D200", # Reformat to one line
42 "D212", # Remove whitespace after opening quotes
43 "COM", # flake8-commas - Black takes care of this
44 "ERA", # eradicate
45 "SIM108", # Use ternary operator `A = X if Y else Z` instead of `if`-`else`-block
46 "PERF203", # `try`-`except` within a loop incurs performance overhead"
47 "PERF401", # Use a list comprehension to create a transformed list
48 "PERF402", # Use `list` or `list.copy` to create a copy of a list
49 "ANN", # Type annotations
50 ]
51 ignore-init-module-imports = true
52
53 [tool.ruff.lint.per-file-ignores]
54 "**/*.py" = [
55 "D100", # Missing docstring in public module
56 "D101", # Missing docstring in public class
57 "D102", # Missing docstring in public method
58 "D103", # Missing docstring in public function
59 "D104", # Missing docstring in public package
60 "D107", # Missing docstring in `__init__`
61 "D205", # 1 blank line required between summary line and description
62 "D415", # First line should end with a period, question mark, or exclamation point
63 "PTH", # use pathlib.Path
64 "ARG001", # Unused function argument: *
65 "ARG002", # Unused method argument: *
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", # Too many arguments to function call"
79 "PLR0915", # Too many statements
80 ]
81 "saltpylint/blacklist.py" = [
82 "BLE001", # Do not catch blind exception: `Exception`
83 ]
84 "saltpylint/thirdparty.py" = [
85 "BLE001", # Do not catch blind exception: `Exception`
86 ]
87 "tools/**/*.py" = [
88 "ANN201", # Missing return type annotation for public function"
89 "D104", # Missing docstring in public package
90 "FBT001", # Boolean positional arg in function definition
91 "FBT002", # Boolean default value in function definition
92 ]
93 "tests/**/*.py" = [
94 "ANN", # Ignore missing type annotations in tests
95 "ARG001", # Unused function argument
96 "DTZ003", # The use of `datetime.datetime.utcnow()` is not allowed, use `datetime.datetime.now(tz=)` instead
97 "PLR2004", # Magic value used in comparison, consider replacing 3 with a constant variable
98 "PT001", # use @pytest.fixture() over @pytest.fixture
99 "PT023", # use @pytest.mark.<blah>() over @pytest.mark.<blah>
100 "RET504", # Unnecessary variable assignment before `return` statement"
101 "S101", # Ignore the use of 'assert ...' in tests
102 "S603", # `subprocess` call: check for execution of untrusted input
103 "SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
104 "TCH002", # Move third-party import into a type-checking block
105 "TCH003", # Move standard library import `pathlib` into a type-checking block
106 ]
107
108 [tool.ruff.lint.flake8-quotes]
109 docstring-quotes = "double"
110
111 [tool.ruff.lint.pydocstyle]
112 # Use Google-style docstrings.
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 # Preserve types, even if a file imports `from __future__ import annotations`.
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