-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
237 lines (204 loc) · 5.76 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "gvm-sync-targets"
dynamic = ["version"]
description = ''
readme = "README.md"
license = "MIT"
requires-python = ">=3.12"
authors = [{ name = "linuxdaemon", email = "linuxdaemon.irc@gmail.com" }]
keywords = []
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"click>=8.1",
"python-gvm>=23.12.0",
"typing_extensions",
"pydantic-xml[lxml]",
]
[project.urls]
Documentation = "https://github.com/snoonetIRC/gvm-sync-targets#readme"
Issues = "https://github.com/snoonetIRC/gvm-sync-targets/issues"
Source = "https://github.com/snoonetIRC/gvm-sync-targets"
[project.scripts]
gvm-sync-targets = "gvm_sync_targets.cli:gvm_sync_targets"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/gvm_sync_targets/_version.py"
[tool.hatch.env]
requires = ["hatch-containers"]
[tool.hatch.envs.default]
dependencies = ["coverage[toml]>=6.5", "pytest>=6.0", "pre-commit", "mypy>=1.8"]
[tool.hatch.envs.default.scripts]
test = "pytest"
test-cov = ["coverage run -pm pytest"]
cov-report = [
"- coverage combine",
"coverage xml",
"coverage report --show-missing",
]
cov = ["- coverage erase", "test-cov", "cov-report"]
cov-all = ["- coverage erase", "hatch run testall:test-cov", "cov-report"]
setup-pre-commit = "python3 -m pre_commit install --install-hooks"
setup-dev = ["setup-pre-commit"]
pre-commit = "python3 -m pre_commit run {args:--all}"
[tool.hatch.envs.types]
dependencies = ["mypy>=1.8", "types-lxml"]
[tool.hatch.envs.types.scripts]
check = "mypy --non-interactive --install-types {args:src/gvm_sync_targets tests}"
[tool.hatch.envs.testall]
type = "container"
dependencies = ["coverage[toml]>=6.5", "pytest>=6.0"]
[[tool.hatch.envs.testall.matrix]]
python = ["3.12"]
[tool.isort]
profile = "black"
line_length = 80
include_trailing_comma = true
use_parentheses = true
float_to_top = true
[tool.black]
line-length = 80
target-version = ["py312"]
include = '\.pyi?$'
[tool.ruff]
line-length = 80
target-version = 'py312'
[tool.ruff.format]
docstring-code-format = true
line-ending = "lf"
skip-magic-trailing-comma = true
[tool.ruff.lint]
ignore-init-module-imports = false
extend-safe-fixes = [
"EM101",
"EM102",
"EM103",
"FLY002",
"TCH001",
"TCH002",
"TRY400",
"SIM117",
"SIM108",
"ANN201",
"D415",
"D200",
]
ignore = [
"ANN101", # Due to be deprecated in ruff
"ANN102", # Due to be deprecated in ruff
"COM812", # Conflicts with formatter
"ISC001", # Conflicts with formatter
"EXE002", # pre-commit does it better, works with SMB shares
"D",
]
select = ["ALL"]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"PLR2004", # Allow "magic values" in tests -aspen
"S101", # Allow asserts in tests
"S301", # Allow pickle in tests
"SIM201", # We need to test weird comparison operators
"SIM202", # We need to test weird comparison operstors
"SIM300", # We need to test both forward and reverse comparisons
"FBT001", # Boolean parameters are fine for test cases
]
[tool.ruff.lint.pycodestyle]
max-line-length = 100
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.check-spdx-header]
headers = ["2024-present linuxdaemon <linuxdaemon.irc@gmail.com>"]
[tool.autoflake]
remove-all-unused-imports = true
in-place = true
[tool.flynt]
aggressive = true
transform-joins = true
transform-concats = true
[tool.mypy]
namespace_packages = true
python_version = "3.12"
warn_unused_configs = true
strict = true
strict_optional = true
plugins = ["pydantic_xml.mypy"]
check_untyped_defs = true
show_error_codes = true
warn_unused_ignores = true
no_implicit_reexport = true
warn_redundant_casts = true
strict_equality = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
extra_checks = true
warn_unreachable = true
warn_return_any = true
warn_no_return = true
enable_error_code = [
"redundant-self",
"redundant-expr",
"possibly-undefined",
"truthy-bool",
"truthy-iterable",
"unused-awaitable",
"explicit-override",
"mutable-override",
"unimported-reveal",
"ignore-without-code",
"narrowed-type-not-subtype",
]
untyped_calls_exclude = ["gvm.transforms"]
follow_imports = "silent"
strict_concatenate = true
allow_redefinition = false
allow_untyped_globals = false
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
warn_incomplete_stub = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--doctest-modules"
testpaths = ["src", "tests"]
filterwarnings = ["error", "ignore:defusedxml.lxml .*:DeprecationWarning:"]
[tool.coverage.run]
source_pkgs = ["gvm_sync_targets", "tests"]
branch = true
parallel = true
relative_files = true
omit = ["src/gvm_sync_targets/_version.py"]
[tool.coverage.paths]
gvm_sync_targets = [
"src/gvm_sync_targets",
"*/gvm-sync-targets/src/gvm_sync_targets",
]
tests = ["tests", "*/gvm-sync-targets/tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver"
version_provider = "scm"
update_changelog_on_bump = true
major_version_zero = true