1
1
[build-system ]
2
+ build-backend = " setuptools.build_meta"
2
3
requires = [
3
4
" setuptools >= 65.3.0" , # required by pyproject+setuptools_scm integration and editable installs
4
5
" setuptools_scm[toml] >= 7.0.5" # required for "no-local-version" scheme
5
6
]
6
- build-backend = " setuptools.build_meta"
7
7
8
8
[project ]
9
- # https://peps.python.org/pep-0621/#readme
10
- requires-python = " >=3.9"
11
- dynamic = [" version" , " dependencies" , " optional-dependencies" ]
12
- name = " ansible-compat"
13
- description = " Ansible compatibility goodies"
14
- readme = " README.md"
15
- authors = [{ "name" = " Sorin Sbarnea" , "email" = " ssbarnea@redhat.com" }]
16
- maintainers = [{ "name" = " Sorin Sbarnea" , "email" = " ssbarnea@redhat.com" }]
17
- license = { text = " MIT" }
9
+ authors = [{"email" = " ssbarnea@redhat.com" , "name" = " Sorin Sbarnea" }]
18
10
classifiers = [
19
11
" Development Status :: 5 - Production/Stable" ,
20
12
" Environment :: Console" ,
@@ -36,52 +28,60 @@ classifiers = [
36
28
" Topic :: Software Development :: Testing" ,
37
29
" Topic :: Utilities"
38
30
]
31
+ description = " Ansible compatibility goodies"
32
+ dynamic = [" version" , " dependencies" , " optional-dependencies" ]
39
33
keywords = [" ansible" ]
34
+ license = {text = " MIT" }
35
+ maintainers = [{"email" = " ssbarnea@redhat.com" , "name" = " Sorin Sbarnea" }]
36
+ name = " ansible-compat"
37
+ readme = " README.md"
38
+ # https://peps.python.org/pep-0621/#readme
39
+ requires-python = " >=3.9"
40
40
41
41
[project .urls ]
42
- homepage = " https://github.com/ansible/ansible-compat"
42
+ changelog = " https://github.com/ansible/ansible-compat/releases "
43
43
documentation = " https://ansible.readthedocs.io/projects/compat/"
44
+ homepage = " https://github.com/ansible/ansible-compat"
44
45
repository = " https://github.com/ansible/ansible-compat"
45
- changelog = " https://github.com/ansible/ansible-compat/releases"
46
46
47
47
[tool .coverage .report ]
48
- exclude_lines = [" pragma: no cover" , " if TYPE_CHECKING:" ]
48
+ exclude_also = [" pragma: no cover" , " if TYPE_CHECKING:" ]
49
49
fail_under = 100
50
- skip_covered = true
51
50
show_missing = true
51
+ skip_covered = true
52
52
53
53
[tool .coverage .run ]
54
- source = [" src" ]
55
54
# Do not use branch until bug is fixes:
56
55
# https://github.com/nedbat/coveragepy/issues/605
57
56
branch = false
58
- parallel = true
59
57
concurrency = [" multiprocessing" , " thread" ]
58
+ parallel = true
59
+ source = [" src" ]
60
60
61
61
[tool .isort ]
62
62
profile = " black"
63
63
64
64
[tool .mypy ]
65
- python_version = 3.9
66
65
color_output = true
67
- error_summary = true
66
+ disallow_any_generics = true
68
67
disallow_untyped_calls = true
69
68
disallow_untyped_defs = true
70
- disallow_any_generics = true
69
+ error_summary = true
71
70
# disallow_any_unimported = True
72
71
# ; warn_redundant_casts = True
73
72
# warn_return_any = True
74
73
# warn_unused_configs = True
75
74
exclude = " test/local-content"
75
+ python_version = " 3.9"
76
76
77
77
[[tool .mypy .overrides ]]
78
- module = " ansible.*"
79
78
ignore_missing_imports = true
79
+ module = " ansible.*"
80
80
81
81
[[tool .mypy .overrides ]]
82
+ ignore_errors = true
82
83
# generated by setuptools-scm, can be missing during linting
83
84
module = " ansible_compat._version"
84
- ignore_errors = true
85
85
86
86
[tool .pydoclint ]
87
87
allow-init-docstring = true
@@ -362,11 +362,15 @@ filterwarnings = [
362
362
testpaths = [" test" ]
363
363
364
364
[tool .ruff ]
365
- preview = true
366
365
extend-include = [" src/ansible_compat/_version.py" ]
366
+ preview = true
367
367
target-version = " py39"
368
- lint.select = [" ALL" ]
369
- lint.ignore = [
368
+
369
+ [tool .ruff .format ]
370
+ docstring-code-format = true
371
+
372
+ [tool .ruff .lint ]
373
+ ignore = [
370
374
# Disabled on purpose:
371
375
" CPY001" ,
372
376
" D203" , # incompatible with D211
@@ -384,9 +388,7 @@ lint.ignore = [
384
388
" PLC0415" ,
385
389
" DOC501" # preview
386
390
]
387
-
388
- [tool .ruff .format ]
389
- docstring-code-format = true
391
+ select = [" ALL" ]
390
392
391
393
[tool .ruff .lint .flake8-pytest-style ]
392
394
parametrize-values-type = " tuple"
@@ -401,16 +403,12 @@ known-third-party = ["packaging"]
401
403
[tool .ruff .lint .pydocstyle ]
402
404
convention = " google"
403
405
404
-
405
406
[tool .setuptools .dynamic ]
406
- dependencies = { file = [" .config/requirements.in" ] }
407
- optional-dependencies.docs = { file = [" .config/requirements-docs.in" ] }
408
- optional-dependencies.test = { file = [" .config/requirements-test.in" ] }
407
+ dependencies = {file = [" .config/requirements.in" ]}
408
+ optional-dependencies.docs = {file = [" .config/requirements-docs.in" ]}
409
+ optional-dependencies.test = {file = [" .config/requirements-test.in" ]}
409
410
410
411
[tool .setuptools_scm ]
411
- local_scheme = " no-local-version"
412
- tag_regex = " ^(?P<prefix>v)?(?P<version>\\ d+[^\\ +]*)(?P<suffix>.*)?$"
413
- write_to = " src/ansible_compat/_version.py"
414
412
# To prevent accidental pick of mobile version tags such 'v6'
415
413
git_describe_command = [
416
414
" git" ,
@@ -421,8 +419,16 @@ git_describe_command = [
421
419
" --match" ,
422
420
" v*.*"
423
421
]
422
+ local_scheme = " no-local-version"
423
+ tag_regex = " ^(?P<prefix>v)?(?P<version>\\ d+[^\\ +]*)(?P<suffix>.*)?$"
424
+ write_to = " src/ansible_compat/_version.py"
425
+
426
+ [tool .tomlsort ]
427
+ in_place = true
428
+ sort_inline_tables = true
429
+ sort_table_keys = true
424
430
425
431
[tool .uv .pip ]
426
432
annotation-style = " line"
427
- no-emit-package = [" ansible-core" , " pip" , " resolvelib" , " typing_extensions" , " uv" ]
428
433
custom-compile-command = " tox run deps"
434
+ no-emit-package = [" ansible-core" , " pip" , " resolvelib" , " typing_extensions" , " uv" ]
0 commit comments