forked from SatelliteQE/broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
179 lines (163 loc) · 5.88 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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
[build-system]
requires = ["setuptools", "setuptools-scm[toml]", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "broker"
description = "The infrastructure middleman."
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE", name = "GNU General Public License v3"}
keywords = ["broker", "AnsibleTower", "docker", "podman", "beaker"]
authors = [
{name = "Jacob J Callahan", email = "[email protected]"}
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"awxkit",
"click",
"dynaconf<4.0.0",
"logzero",
"packaging",
"pyyaml",
"setuptools",
"ssh2-python312",
]
dynamic = ["version"] # dynamic fields to update on build - version via setuptools_scm
[project.urls]
Repository = "https://github.com/SatelliteQE/broker"
[project.optional-dependencies]
beaker = ["beaker-client"]
dev = [
"pre-commit",
"pytest",
"ruff"
]
docker = [
"docker",
"paramiko"
]
podman = ["podman"]
setup = [
"build",
"twine",
]
ssh2_py311 = ["ssh2-python"]
ssh2_python = ["ssh2-python"]
ssh2_python312 = ["ssh2-python312"]
ansible_pylibssh = ["ansible-pylibssh"]
hussh = ["hussh"]
[project.scripts]
broker = "broker.commands:cli"
[tool.setuptools]
platforms = ["any"]
zip-safe = false
include-package-data = true
[tool.setuptools.packages.find]
include = ["broker"]
[tool.setuptools_scm] # same as use_scm_version=True in setup.py
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["-v", "-l", "--color=yes", "--code-highlight=yes"]
[tool.ruff]
line-length = 100
exclude = ["tests/"]
target-version = "py311"
fixable = ["ALL"]
select = [
"B002", # Python does not support the unary prefix increment
"B007", # Loop control variable {name} not used within loop body
"B009", # Do not call getattr with a constant attribute value
"B010", # Do not call setattr with a constant attribute value
"B011", # Do not `assert False`, raise `AssertionError` instead
"B013", # Redundant tuple in exception handler
"B014", # Exception handler with duplicate exception
"B023", # Function definition does not bind loop variable {name}
"B026", # Star-arg unpacking after a keyword argument is strongly discouraged
"BLE001", # Using bare except clauses is prohibited
"C", # complexity
"C4", # flake8-comprehensions
"COM818", # Trailing comma on bare tuple prohibited
"D", # docstrings
"E", # pycodestyle
"F", # pyflakes/autoflake
"G", # flake8-logging-format
"I", # isort
"ISC001", # Implicitly concatenated string literals on one line
"N804", # First argument of a class method should be named cls
"N805", # First argument of a method should be named self
"N815", # Variable {name} in class scope should not be mixedCase
"N999", # Invalid module name: '{name}'
"PERF", # Perflint rules
"PGH004", # Use specific rule codes when using noqa
"PLC0414", # Useless import alias. Import alias does not rename original package.
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint
"PLW", # pylint
"PTH", # Use pathlib
"RUF", # Ruff-specific rules
"S103", # bad-file-permissions
"S108", # hardcoded-temp-file
"S110", # try-except-pass
"S112", # try-except-continue
"S113", # Probable use of requests call without timeout
"S306", # suspicious-mktemp-usage
"S307", # suspicious-eval-usage
"S601", # paramiko-call
"S602", # subprocess-popen-with-shell-equals-true
"S604", # call-with-shell-equals-true
"S609", # unix-command-wildcard-injection
"SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
"SIM117", # Merge with-statements that use the same scope
"SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys()
"SIM201", # Use {left} != {right} instead of not {left} == {right}
"SIM208", # Use {expr} instead of not (not {expr})
"SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a}
"SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'.
"SIM401", # Use get from dict with default instead of an if block
"T100", # Trace found: {name} used
"T20", # flake8-print
"TRY004", # Prefer TypeError exception for invalid type
"TRY302", # Remove exception handler; error is immediately re-raised
"PLR0911", # Too many return statements ({returns} > {max_returns})
"PLR0912", # Too many branches ({branches} > {max_branches})
"PLR0915", # Too many statements ({statements} > {max_statements})
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
"UP", # pyupgrade
"W", # pycodestyle
]
ignore = [
"ANN", # flake8-annotations
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D406", # Section name should end with a newline
"D407", # Section name underlining
"D413", # Missing blank line after last section
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
"PLR0913", # Too many arguments to function call ({c_args} > {max_args})
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
"D107", # Missing docstring in __init__
]
[tool.ruff.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.isort]
force-sort-within-sections = true
known-first-party = [
"broker",
]
combine-as-imports = true
[tool.ruff.per-file-ignores]
# None at this time
[tool.ruff.mccabe]
max-complexity = 25