-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (103 loc) · 2.69 KB
/
pyproject.toml
File metadata and controls
117 lines (103 loc) · 2.69 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
##
# Linters
##
##
# Mypy
[tool.mypy]
check_untyped_defs = true
ignore_missing_imports = false
strict = true
warn_no_return = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "ansible_collections.benschubert.infrastructure.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "ansible.module_utils.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "testinfra.*"
ignore_missing_imports = true
##
# Pylint
[tool.pylint.basic]
good-names = ["pk"]
[tool.pylint.messages_control]
disable = [
# Taken care of by ruff
"fixme",
"import-error",
"inconsistent-return-statements",
"invalid-name",
"line-too-long",
"missing-class-docstring",
"missing-function-docstring",
"missing-module-docstring",
"redefined-builtin",
"redefined-outer-name",
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-positional-arguments",
"unused-argument",
"unused-import",
"wrong-import-position",
# Duplicate code can't be disabled on a per problem basis
"duplicate-code",
]
[tool.pylint.variables]
init-import = true
##
# Ruff
[tool.ruff]
target-version = "py313"
line-length = 79
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN401", # Allow using Any as typing
"C901", # Disable complexity checks
"COM812", # Otherwise conflicts with the formatter
"D104", # Don't force documenting packages
"D107", # Don't document __init__
"D203", # No blank line before class docstrings
"D212", # Start docstring on second line
"D404", # Allow more freeform documentation
"FBT001", # Allow non-kwonly booleans
"FBT002", # Allow non-kwonly booleans
"FIX001", # Allow fixmes
"S101", # Allow asserts
"SIM108", # Don't force ternary operators if something else is more readable
"TD", # Don't force format in FIXMEs
]
pycodestyle.max-line-length = 119
pylint.max-args = 8
pylint.max-branches = 13
[tool.ruff.lint.per-file-ignores]
"docs/*" = [
"D", # Don't require docs for tests
"INP001", # No explicit packages here
]
"extensions/molecule/default/tests/*" = [
"D", # Don't require docs for tests
"T201", # Allow print for debugs
]
"plugins/modules/*" = [
"D100", # Documentation in Ansible is under DOCUMENTATION=
"D103", # Don't force documentation of public methods
"E402", # Imports are not top level for ansible modules
]
"plugins/doc_fragments/*" = [
"D", # No documentation
]
##
# Tests
##
[tool.pytest.ini_options]
addopts = "--color=yes --verbose --verbose"
filterwarnings = [
"error",
"ignore:.*to host '.*'.*:urllib3.exceptions.InsecureRequestWarning"
]