-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
87 lines (81 loc) · 2.13 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[tool.ruff]
line-length = 120
select = [
"ALL",
]
unfixable = [
"PT023", # (pytest-incorrect-mark-parentheses-style)
]
show-fixes = true
show-source = true
target-version = "py37"
respect-gitignore = true
src = [
"src",
"test"
]
extend-exclude = [
".nox",
"examples",
]
extend-include = [
"setup.py",
"noxfile.py",
"src/**/*.pyi",
]
ignore-init-module-imports = true
builtins = [
"__opts__",
"__salt__",
"__context__",
"__grains__",
"__pillar__",
"__salt_system_encoding__",
]
# Group violations by containing file.
ignore = [
"ANN", # annotations
"PTH", # Replace with pathlib.Path
"D107", # Missing docstring in `__init__`
"D200", # Reformat to one line
"D212", # Remove whitespace after opening quotes
"COM", # flake8-commas - Black takes care of this
"ERA", # eradicate
"SIM108", # Use ternary operator `A = X if Y else Z` instead of `if`-`else`-block
"PERF203", # `try`-`except` within a loop incurs performance overhead"
"PERF401", # Use a list comprehension to create a transformed list
"PERF402", # Use `list` or `list.copy` to create a copy of a list
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"FBT003", # Boolean positional value in function call
"PT001", # use @pytest.fixture() over @pytest.fixture
"PT023", # Use `@pytest.mark.<xyz>()` over `@pytest.mark.<xyz>`
]
[tool.ruff.per-file-ignores]
"tools/**/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
]
[tool.ruff.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.ruff.isort]
combine-as-imports = false
force-single-line = true
known-first-party = ["src"]
forced-separate = ["tests"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.mccabe]
max-complexity = 25
[tool.ruff.pylint]
max-args = 10
max-branches = 35
max-returns = 8
[tool.ruff.pep8-naming]
ignore-names = [
"__virtual__",
]