forked from ansible/pytest-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
152 lines (137 loc) · 3.86 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
[build-system]
requires = [
"setuptools >= 63.0.0", # required by pyproject+setuptools_scm integration
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme
]
build-backend = "setuptools.build_meta"
[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.7"
dynamic = ["version", "dependencies", "optional-dependencies"]
name = "pytest-ansible"
description = "Plugin for pytest to simplify calling ansible modules from tests or fixtures"
readme = "README.md"
authors = [{ "name" = "Ansible by Red Hat", "email" = "[email protected]" }]
maintainers = [{ "name" = "Ansible by Red Hat", "email" = "[email protected]" }]
license = { text = "MIT" }
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Quality Assurance',
'Topic :: Utilities',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
]
keywords = ["ansible", "testing", "pytest"]
[project.entry-points.pytest11]
pytest-ansible = 'pytest_ansible.plugin'
[project.urls]
homepage = "https://github.com/ansible/pytest-ansible"
documentation = "https://github.com/ansible/pytest-ansible"
repository = "https://github.com/ansible/pytest-ansible"
changelog = "https://github.com/ansible/pytest-ansible/releases"
[tool.mypy]
python_version = 3.9
ignore_missing_imports = true
ignore_errors = true
# strict = true
color_output = true
error_summary = true
# Temporary disabled until we fix them:
disallow_untyped_calls = false
disallow_untyped_defs = false
disallow_any_generics = false
disable_error_code = ["var-annotated", "attr-defined"]
[[tool.mypy.overrides]]
module = ["ansible.*"]
ignore_missing_imports = true
ignore_errors = true
[tool.pylint.MAIN]
extension-pkg-allow-list = ["black.parsing"]
[tool.pylint.IMPORTS]
preferred-modules = ["py:pathlib", "unittest:pytest"]
[tool.pylint."MESSAGES CONTROL"]
# increase from default is 50 which is too aggressive
max-statements = 60
disable = [
# On purpose disabled as we rely on black
"line-too-long",
# https://github.com/PyCQA/pylint/issues/850
"cyclic-import",
# https://github.com/PyCQA/pylint/issues/8453
"preferred-module",
# Temporarily disabled until we fix them:
"duplicate-code",
"import-error",
"import-outside-toplevel",
"missing-function-docstring",
"missing-module-docstring",
"no-name-in-module",
"protected-access",
"redefined-outer-name",
"too-many-branches",
"too-many-locals",
"too-many-statements",
"unexpected-keyword-arg",
"unused-argument",
"invalid-name",
"too-few-public-methods",
]
[tool.pytest.ini_options]
minversion = 6.0
addopts = ["-v", "--tb=native"]
markers = [
"old",
"unit",
"ansible_v1_xfail",
"requires_ansible_v1",
"requires_ansible_v2",
"requires_ansible_v24",
]
[tool.ruff]
select = ["ALL"]
ignore = [
"E501", # we use black
# temporary disabled until we fix them:
"ANN",
"ARG",
"B",
"C",
"D",
"EM",
"FBT",
"INP",
"ISC",
"PGH",
"PIE",
"PLC",
"PLR",
"PLW",
"RUF",
"S",
"SLF",
"T",
"TRY",
]
target-version = "py37"
# Same as Black.
line-length = 88
[tool.ruff.flake8-pytest-style]
parametrize-values-type = "tuple"
[tool.ruff.per-file-ignores]
"tests/**" = ["S101"]
[tool.setuptools.dynamic]
optional-dependencies.test = { file = [".config/requirements-test.txt"] }
optional-dependencies.lock = { file = [".config/requirements-lock.txt"] }
dependencies = { file = [".config/requirements.in"] }
[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "src/pytest_ansible/_version.py"