python-semantic-release 9.2.0__tar.gz → 9.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. {python-semantic-release-9.2.0/python_semantic_release.egg-info → python-semantic-release-9.2.1}/PKG-INFO +2 -2
  2. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/commit-parsing.rst +1 -1
  3. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/pyproject.toml +12 -3
  4. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1/python_semantic_release.egg-info}/PKG-INFO +2 -2
  5. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/python_semantic_release.egg-info/requires.txt +1 -1
  6. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/__init__.py +2 -1
  7. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/changelog/release_history.py +5 -9
  8. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/changelog/template.py +3 -1
  9. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/config.py +4 -2
  10. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/util.py +1 -0
  11. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/_base.py +1 -2
  12. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/angular.py +1 -0
  13. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/emoji.py +1 -0
  14. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/scipy.py +1 -0
  15. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/tag.py +1 -0
  16. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/helpers.py +2 -2
  17. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/_base.py +1 -0
  18. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/bitbucket.py +8 -9
  19. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/gitea.py +1 -0
  20. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/github.py +1 -0
  21. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/gitlab.py +1 -0
  22. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/version/version.py +2 -4
  23. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/conftest.py +2 -4
  24. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/conftest.py +2 -2
  25. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/example_project.py +5 -10
  26. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/git_repo.py +14 -18
  27. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_util.py +1 -1
  28. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/test_helpers.py +9 -0
  29. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/version/test_algorithm.py +1 -1
  30. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/util.py +2 -1
  31. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/AUTHORS.rst +0 -0
  32. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/LICENSE +0 -0
  33. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/MANIFEST.in +0 -0
  34. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/README.rst +0 -0
  35. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/Makefile +0 -0
  36. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/algorithm.rst +0 -0
  37. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/automatic-releases/cronjobs.rst +0 -0
  38. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/automatic-releases/github-actions.rst +0 -0
  39. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/automatic-releases/index.rst +0 -0
  40. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/automatic-releases/travis.rst +0 -0
  41. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/changelog_templates.rst +0 -0
  42. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/commands.rst +0 -0
  43. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/conf.py +0 -0
  44. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/configuration.rst +0 -0
  45. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/contributing.rst +0 -0
  46. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/contributors.rst +0 -0
  47. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/github-action.rst +0 -0
  48. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/index.rst +0 -0
  49. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/make.bat +0 -0
  50. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/migrating_from_v7.rst +0 -0
  51. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/multibranch_releases.rst +0 -0
  52. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/strict_mode.rst +0 -0
  53. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/docs/troubleshooting.rst +0 -0
  54. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/python_semantic_release.egg-info/SOURCES.txt +0 -0
  55. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/python_semantic_release.egg-info/dependency_links.txt +0 -0
  56. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/python_semantic_release.egg-info/entry_points.txt +0 -0
  57. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/python_semantic_release.egg-info/top_level.txt +0 -0
  58. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/__main__.py +0 -0
  59. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/changelog/__init__.py +0 -0
  60. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/changelog/context.py +0 -0
  61. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/__init__.py +0 -0
  62. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/__init__.py +0 -0
  63. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/changelog.py +0 -0
  64. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/generate_config.py +0 -0
  65. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/main.py +0 -0
  66. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/publish.py +0 -0
  67. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/commands/version.py +0 -0
  68. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/common.py +0 -0
  69. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/const.py +0 -0
  70. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/github_actions_output.py +0 -0
  71. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/cli/masking_filter.py +0 -0
  72. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/__init__.py +0 -0
  73. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/token.py +0 -0
  74. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/commit_parser/util.py +0 -0
  75. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/const.py +0 -0
  76. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
  77. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/data/templates/release_notes.md.j2 +0 -0
  78. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/enums.py +0 -0
  79. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/errors.py +0 -0
  80. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/__init__.py +0 -0
  81. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/token_auth.py +0 -0
  82. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/hvcs/util.py +0 -0
  83. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/version/__init__.py +0 -0
  84. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/version/algorithm.py +0 -0
  85. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/version/declaration.py +0 -0
  86. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/semantic_release/version/translator.py +0 -0
  87. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/setup.cfg +0 -0
  88. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/__init__.py +0 -0
  89. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/__init__.py +0 -0
  90. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_changelog.py +0 -0
  91. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_generate_config.py +0 -0
  92. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_help.py +0 -0
  93. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_main.py +0 -0
  94. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_publish.py +0 -0
  95. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/command_line/test_version.py +0 -0
  96. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/const.py +0 -0
  97. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/__init__.py +0 -0
  98. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/commit_parsers.py +0 -0
  99. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/__init__.py +0 -0
  100. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  101. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  102. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  103. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  104. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  105. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  106. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
  107. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  108. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
  109. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/fixtures/scipy.py +0 -0
  110. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/scenario/__init__.py +0 -0
  111. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/scenario/test_next_version.py +0 -0
  112. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/scenario/test_release_history.py +0 -0
  113. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/scenario/test_template_render.py +0 -0
  114. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/__init__.py +0 -0
  115. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/__init__.py +0 -0
  116. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  117. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  118. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  119. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  120. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/__init__.py +0 -0
  121. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/test_config.py +0 -0
  122. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  123. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  124. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/test_util.py +0 -0
  125. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/cli/test_version.py +0 -0
  126. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  127. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/helper.py +0 -0
  128. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
  129. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  130. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  131. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
  132. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/commit_parser/test_token.py +0 -0
  133. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  134. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  135. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  136. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_gitea.py +0 -0
  137. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_github.py +0 -0
  138. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  139. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  140. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  141. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/version/__init__.py +0 -0
  142. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  143. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/version/test_translator.py +0 -0
  144. {python-semantic-release-9.2.0 → python-semantic-release-9.2.1}/tests/unit/semantic_release/version/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.2.0
3
+ Version: 9.2.1
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -53,7 +53,7 @@ Requires-Dist: types-pytest-lazy-fixture>=0.6.3.3; extra == "test"
53
53
  Provides-Extra: dev
54
54
  Requires-Dist: pre-commit; extra == "dev"
55
55
  Requires-Dist: tox; extra == "dev"
56
- Requires-Dist: ruff==0.1.11; extra == "dev"
56
+ Requires-Dist: ruff==0.3.2; extra == "dev"
57
57
  Provides-Extra: mypy
58
58
  Requires-Dist: mypy; extra == "mypy"
59
59
  Requires-Dist: types-requests; extra == "mypy"
@@ -284,7 +284,7 @@ available.
284
284
  .. _Rust's error handling: https://doc.rust-lang.org/book/ch09-02-recoverable-errors-with-result.html
285
285
  .. _black: https://github.com/psf/black/blob/main/src/black/rusty.py
286
286
  .. _catching exceptions in Python is slower: https://docs.python.org/3/faq/design.html#how-fast-are-exceptions
287
- .. _namedtuple: https://docs.python.org/3.7/library/typing.html#typing.NamedTuple
287
+ .. _namedtuple: https://docs.python.org/3/library/typing.html#typing.NamedTuple
288
288
 
289
289
  .. _commit-parsing-parser-options:
290
290
 
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.2.0"
9
+ version = "9.2.1"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -68,7 +68,7 @@ test = [
68
68
  "requests-mock>=1.10.0,<2",
69
69
  "types-pytest-lazy-fixture>=0.6.3.3",
70
70
  ]
71
- dev = ["pre-commit", "tox", "ruff==0.1.11"]
71
+ dev = ["pre-commit", "tox", "ruff==0.3.2"]
72
72
  mypy = ["mypy", "types-requests"]
73
73
 
74
74
  [tool.pytest.ini_options]
@@ -221,6 +221,9 @@ ignore = [
221
221
  "INP001",
222
222
  # Errors should end with "Error"
223
223
  "N818",
224
+ # Fixtures that do not return a value need an underscore prefix. The rule
225
+ # does not handle generators.
226
+ "PT004",
224
227
  # flake8-pytest-style, values rowtype (list|tuple)
225
228
  "PT007",
226
229
  # pytest.raises needs a match - eventually want to enable
@@ -285,7 +288,7 @@ line-ending = "lf"
285
288
  "semantic_release/hvcs/_base.py" = ["ARG002"]
286
289
  # from tests.fixtures import * is deliberate
287
290
  "tests/conftest.py" = ["F403"]
288
- "tests/fixtures/__init__.py" = ["F403"]
291
+ "tests/fixtures/**/__init__.py" = ["F403"]
289
292
 
290
293
  "tests/*" = [
291
294
  # unused arguments - likely fixtures to be moved to
@@ -306,8 +309,11 @@ line-ending = "lf"
306
309
  "SLF001",
307
310
  # Annotations
308
311
  "ANN",
312
+ # Using format instead of f-string for readablity
313
+ "UP032"
309
314
  ]
310
315
 
316
+
311
317
  [tool.ruff.lint.mccabe]
312
318
  max-complexity = 10
313
319
 
@@ -345,6 +351,9 @@ section-order = [
345
351
  ]
346
352
  sections = { "tests" = ["tests"] }
347
353
 
354
+ [tool.vulture]
355
+ ignore_names = ["change_to_ex_proj_dir", "init_example_project"]
356
+
348
357
  [tool.semantic_release]
349
358
  logging_use_named_masks = true
350
359
  tag_format = "v{version}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.2.0
3
+ Version: 9.2.1
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -53,7 +53,7 @@ Requires-Dist: types-pytest-lazy-fixture>=0.6.3.3; extra == "test"
53
53
  Provides-Extra: dev
54
54
  Requires-Dist: pre-commit; extra == "dev"
55
55
  Requires-Dist: tox; extra == "dev"
56
- Requires-Dist: ruff==0.1.11; extra == "dev"
56
+ Requires-Dist: ruff==0.3.2; extra == "dev"
57
57
  Provides-Extra: mypy
58
58
  Requires-Dist: mypy; extra == "mypy"
59
59
  Requires-Dist: types-requests; extra == "mypy"
@@ -14,7 +14,7 @@ shellingham>=1.5.0.post1
14
14
  [dev]
15
15
  pre-commit
16
16
  tox
17
- ruff==0.1.11
17
+ ruff==0.3.2
18
18
 
19
19
  [docs]
20
20
  Sphinx<=6.0.0
@@ -1,4 +1,5 @@
1
1
  """Python Semantic Release"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  from semantic_release.commit_parser import (
@@ -23,7 +24,7 @@ from semantic_release.version import (
23
24
  tags_and_versions,
24
25
  )
25
26
 
26
- __version__ = "9.2.0"
27
+ __version__ = "9.2.1"
27
28
 
28
29
 
29
30
  def setup_hook(argv: list[str]) -> None:
@@ -3,20 +3,16 @@ from __future__ import annotations
3
3
  import logging
4
4
  from collections import defaultdict
5
5
  from datetime import datetime, timedelta, timezone
6
- from typing import TYPE_CHECKING, Iterable, Iterator
6
+ from typing import TYPE_CHECKING, TypedDict
7
7
 
8
8
  from git.objects.tag import TagObject
9
9
 
10
- # For Python3.7 compatibility
11
- from typing_extensions import TypedDict
12
-
13
- from semantic_release.commit_parser import (
14
- ParseError,
15
- )
10
+ from semantic_release.commit_parser import ParseError
16
11
  from semantic_release.version.algorithm import tags_and_versions
17
12
 
18
13
  if TYPE_CHECKING:
19
- import re
14
+ from re import Pattern
15
+ from typing import Iterable, Iterator
20
16
 
21
17
  from git.repo.base import Repo
22
18
  from git.util import Actor
@@ -39,7 +35,7 @@ class ReleaseHistory:
39
35
  repo: Repo,
40
36
  translator: VersionTranslator,
41
37
  commit_parser: CommitParser[ParseResult, ParserOptions],
42
- exclude_commit_patterns: Iterable[re.Pattern[str]] = (),
38
+ exclude_commit_patterns: Iterable[Pattern[str]] = (),
43
39
  ) -> ReleaseHistory:
44
40
  all_git_tags_and_versions = tags_and_versions(repo.tags, translator)
45
41
  unreleased: dict[str, list[ParseResult]] = defaultdict(list)
@@ -12,8 +12,10 @@ from jinja2.sandbox import SandboxedEnvironment
12
12
  from semantic_release.helpers import dynamic_import
13
13
 
14
14
  if TYPE_CHECKING:
15
+ from typing import Literal
16
+
15
17
  from jinja2 import Environment
16
- from typing_extensions import Literal
18
+
17
19
 
18
20
  log = logging.getLogger(__name__)
19
21
 
@@ -7,13 +7,15 @@ from collections.abc import Mapping
7
7
  from dataclasses import dataclass, is_dataclass
8
8
  from enum import Enum
9
9
  from pathlib import Path
10
- from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type, Union
10
+ from typing import Any, ClassVar, Dict, List, Literal, Optional, Tuple, Type, Union
11
11
 
12
12
  from git import Actor
13
13
  from git.repo.base import Repo
14
14
  from jinja2 import Environment
15
15
  from pydantic import BaseModel, Field, RootModel, ValidationError, model_validator
16
- from typing_extensions import Annotated, Literal
16
+
17
+ # For Python 3.8 compatibility
18
+ from typing_extensions import Annotated
17
19
 
18
20
  from semantic_release import hvcs
19
21
  from semantic_release.changelog import environment
@@ -1,4 +1,5 @@
1
1
  """Utilities for command-line functionality"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import json
@@ -71,5 +71,4 @@ class CommitParser(ABC, Generic[_TT, _OPTS]):
71
71
  self.options = options
72
72
 
73
73
  @abstractmethod
74
- def parse(self, commit: Commit) -> _TT:
75
- ...
74
+ def parse(self, commit: Commit) -> _TT: ...
@@ -2,6 +2,7 @@
2
2
  Angular commit style parser
3
3
  https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines
4
4
  """
5
+
5
6
  from __future__ import annotations
6
7
 
7
8
  import logging
@@ -1,4 +1,5 @@
1
1
  """Commit parser which looks for emojis to determine the type of commit"""
2
+
2
3
  import logging
3
4
  from typing import Tuple
4
5
 
@@ -34,6 +34,7 @@ Supported Changelog Sections::
34
34
 
35
35
  .. _`scipy-style`: https://docs.scipy.org/doc/scipy/reference/dev/contributor/development_workflow.html#writing-the-commit-message
36
36
  """
37
+
37
38
  from __future__ import annotations
38
39
 
39
40
  import logging
@@ -1,4 +1,5 @@
1
1
  """Legacy commit parser from Python Semantic Release 1.0"""
2
+
2
3
  import logging
3
4
  import re
4
5
 
@@ -114,12 +114,12 @@ def parse_git_url(url: str) -> ParsedGitUrl:
114
114
  # Normalizers are a list of tuples of (pattern, replacement)
115
115
  normalizers = [
116
116
  # normalize implicit ssh urls to explicit ssh://
117
- (r"^(\w+@)", r"ssh://\1"),
117
+ (r"^([\w._-]+@)", r"ssh://\1"),
118
118
  # normalize git+ssh:// urls to ssh://
119
119
  (r"^git\+ssh://", "ssh://"),
120
120
  # normalize an scp like syntax to URL compatible syntax
121
121
  # excluding port definitions (:#####) & including numeric usernames
122
- (r"(ssh://(?:\w+@)?[\w.-]+):(?!\d{1,5}/\w+/)(.*)$", r"\1/\2"),
122
+ (r"(ssh://(?:[\w._-]+@)?[\w.-]+):(?!\d{1,5}/\w+/)(.*)$", r"\1/\2"),
123
123
  # normalize implicit file (windows || posix) urls to explicit file:// urls
124
124
  (r"^([C-Z]:/)|^/(\w)", r"file:///\1\2"),
125
125
  ]
@@ -1,4 +1,5 @@
1
1
  """Common functionality and interface for interacting with Git remote VCS"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import logging
@@ -37,7 +37,7 @@ class Bitbucket(HvcsBase):
37
37
  API_VERSION = "2.0"
38
38
  DEFAULT_DOMAIN = "bitbucket.org"
39
39
  DEFAULT_API_DOMAIN = "api.bitbucket.org"
40
- DEFAULT_ENV_TOKEN_NAME = "BITBUCKET_TOKEN"
40
+ DEFAULT_ENV_TOKEN_NAME = "BITBUCKET_TOKEN" # noqa: S105
41
41
 
42
42
  def __init__(
43
43
  self,
@@ -93,14 +93,13 @@ class Bitbucket(HvcsBase):
93
93
  f"https://{user}:{self.token}@"
94
94
  f"{self.hvcs_domain}/{self.owner}/{self.repo_name}.git"
95
95
  )
96
- else:
97
- # Note: Assume the token is a repository token which will only work on the
98
- # repository it was created for.
99
- # https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens
100
- return (
101
- f"https://x-token-auth:{self.token}@"
102
- f"{self.hvcs_domain}/{self.owner}/{self.repo_name}.git"
103
- )
96
+ # Note: Assume the token is a repository token which will only work on the
97
+ # repository it was created for.
98
+ # https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens
99
+ return (
100
+ f"https://x-token-auth:{self.token}@"
101
+ f"{self.hvcs_domain}/{self.owner}/{self.repo_name}.git"
102
+ )
104
103
 
105
104
  def commit_hash_url(self, commit_hash: str) -> str:
106
105
  return (
@@ -1,4 +1,5 @@
1
1
  """Helper code for interacting with a Gitea remote VCS"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import glob
@@ -1,4 +1,5 @@
1
1
  """Helper code for interacting with a GitHub remote VCS"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import glob
@@ -1,4 +1,5 @@
1
1
  """Helper code for interacting with a Gitlab remote VCS"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  import logging
@@ -25,15 +25,13 @@ VersionComparator = Callable[["Version", "Version"], bool]
25
25
  def _comparator(
26
26
  *,
27
27
  type_guard: bool,
28
- ) -> Callable[[VersionComparator], VersionComparator]:
29
- ...
28
+ ) -> Callable[[VersionComparator], VersionComparator]: ...
30
29
 
31
30
 
32
31
  @overload
33
32
  def _comparator(
34
33
  method: VersionComparator, *, type_guard: bool = True
35
- ) -> VersionComparator:
36
- ...
34
+ ) -> VersionComparator: ...
37
35
 
38
36
 
39
37
  def _comparator(
@@ -31,14 +31,12 @@ if TYPE_CHECKING:
31
31
  class ReadConfigFileFn(Protocol):
32
32
  """Read the raw config file from `config_path`."""
33
33
 
34
- def __call__(self, file: Path | str) -> RawConfig:
35
- ...
34
+ def __call__(self, file: Path | str) -> RawConfig: ...
36
35
 
37
36
  class RetrieveRuntimeContextFn(Protocol):
38
37
  """Retrieve the runtime context for a repo."""
39
38
 
40
- def __call__(self, repo: Repo) -> RuntimeContext:
41
- ...
39
+ def __call__(self, repo: Repo) -> RuntimeContext: ...
42
40
 
43
41
 
44
42
  @pytest.fixture
@@ -1,4 +1,5 @@
1
1
  """Note: fixtures are stored in the tests/fixtures directory for better organisation"""
2
+
2
3
  from __future__ import annotations
3
4
 
4
5
  from pathlib import Path
@@ -13,8 +14,7 @@ if TYPE_CHECKING:
13
14
  from typing import Generator, Protocol
14
15
 
15
16
  class TeardownCachedDirFn(Protocol):
16
- def __call__(self, directory: Path) -> Path:
17
- ...
17
+ def __call__(self, directory: Path) -> Path: ...
18
18
 
19
19
 
20
20
  @pytest.fixture(scope="session")
@@ -38,24 +38,19 @@ if TYPE_CHECKING:
38
38
  ExProjectDir = Path
39
39
 
40
40
  class SetFlagFn(Protocol):
41
- def __call__(self, flag: bool) -> None:
42
- ...
41
+ def __call__(self, flag: bool) -> None: ...
43
42
 
44
43
  class UpdatePyprojectTomlFn(Protocol):
45
- def __call__(self, setting: str, value: Any) -> None:
46
- ...
44
+ def __call__(self, setting: str, value: Any) -> None: ...
47
45
 
48
46
  class UseHvcsFn(Protocol):
49
- def __call__(self, domain: str | None = None) -> type[HvcsBase]:
50
- ...
47
+ def __call__(self, domain: str | None = None) -> type[HvcsBase]: ...
51
48
 
52
49
  class UseParserFn(Protocol):
53
- def __call__(self) -> type[CommitParser]:
54
- ...
50
+ def __call__(self) -> type[CommitParser]: ...
55
51
 
56
52
  class UseReleaseNotesTemplateFn(Protocol):
57
- def __call__(self) -> None:
58
- ...
53
+ def __call__(self) -> None: ...
59
54
 
60
55
 
61
56
  @pytest.fixture(scope="session")
@@ -69,30 +69,26 @@ if TYPE_CHECKING:
69
69
  hvcs_domain: str = ...,
70
70
  tag_format_str: str | None = None,
71
71
  extra_configs: dict[str, TomlSerializableTypes] | None = None,
72
- ) -> tuple[Path, HvcsBase]:
73
- ...
72
+ ) -> tuple[Path, HvcsBase]: ...
74
73
 
75
74
  class CommitNReturnChangelogEntryFn(Protocol):
76
- def __call__(self, git_repo: Repo, commit_msg: str, hvcs: HvcsBase) -> str:
77
- ...
75
+ def __call__(self, git_repo: Repo, commit_msg: str, hvcs: HvcsBase) -> str: ...
78
76
 
79
77
  class SimulateChangeCommitsNReturnChangelogEntryFn(Protocol):
80
78
  def __call__(
81
79
  self, git_repo: Repo, commit_msgs: list[CommitMsg], hvcs: HvcsBase
82
- ) -> list[CommitMsg]:
83
- ...
80
+ ) -> list[CommitMsg]: ...
84
81
 
85
82
  class CreateReleaseFn(Protocol):
86
- def __call__(self, git_repo: Repo, version: str, tag_format: str = ...) -> None:
87
- ...
83
+ def __call__(
84
+ self, git_repo: Repo, version: str, tag_format: str = ...
85
+ ) -> None: ...
88
86
 
89
87
  class ExProjectGitRepoFn(Protocol):
90
- def __call__(self) -> Repo:
91
- ...
88
+ def __call__(self) -> Repo: ...
92
89
 
93
90
  class GetVersionStringsFn(Protocol):
94
- def __call__(self) -> list[VersionStr]:
95
- ...
91
+ def __call__(self) -> list[VersionStr]: ...
96
92
 
97
93
  RepoDefinition = dict[VersionStr, RepoVersionDef]
98
94
  """
@@ -101,16 +97,16 @@ if TYPE_CHECKING:
101
97
  """
102
98
 
103
99
  class GetRepoDefinitionFn(Protocol):
104
- def __call__(self, commit_type: CommitConvention = "angular") -> RepoDefinition:
105
- ...
100
+ def __call__(
101
+ self, commit_type: CommitConvention = "angular"
102
+ ) -> RepoDefinition: ...
106
103
 
107
104
  class SimulateDefaultChangelogCreationFn(Protocol):
108
105
  def __call__(
109
106
  self,
110
107
  repo_definition: RepoDefinition,
111
108
  dest_file: Path | None = None,
112
- ) -> str:
113
- ...
109
+ ) -> str: ...
114
110
 
115
111
 
116
112
  @pytest.fixture(scope="session")
@@ -247,7 +243,7 @@ def cached_example_git_project(
247
243
 
248
244
 
249
245
  @pytest.fixture(scope="session")
250
- def build_configured_base_repo(
246
+ def build_configured_base_repo( # noqa: C901
251
247
  cached_example_git_project: Path,
252
248
  use_github_hvcs: UseHvcsFn,
253
249
  use_gitlab_hvcs: UseHvcsFn,
@@ -267,7 +263,7 @@ def build_configured_base_repo(
267
263
  derivative fixtures can call this fixture with individual parameters.
268
264
  """
269
265
 
270
- def _build_configured_base_repo(
266
+ def _build_configured_base_repo( # noqa: C901
271
267
  dest_dir: Path | str,
272
268
  commit_type: str = "angular",
273
269
  hvcs_client_name: str = "github",
@@ -16,7 +16,7 @@ from semantic_release.commit_parser.util import parse_paragraphs
16
16
  ["Long explanation", "full of interesting details"],
17
17
  ),
18
18
  (
19
- # Windows (CRLF)
19
+ # Windows uses CRLF
20
20
  "Long\r\nexplanation\r\n\r\nfull of interesting\r\ndetails",
21
21
  ["Long explanation", "full of interesting details"],
22
22
  ),
@@ -61,6 +61,15 @@ from semantic_release.helpers import ParsedGitUrl, parse_git_url
61
61
  "myproject",
62
62
  ),
63
63
  ),
64
+ (
65
+ "first.last_test-1@subsubdomain.subdomain.company-net.com:username/myproject.git",
66
+ ParsedGitUrl(
67
+ "ssh",
68
+ "first.last_test-1@subsubdomain.subdomain.company-net.com",
69
+ "username",
70
+ "myproject",
71
+ ),
72
+ ),
64
73
  (
65
74
  "ssh://git@github.com:3759/myproject.git",
66
75
  ParsedGitUrl("ssh", "git@github.com", "3759", "myproject"),
@@ -29,7 +29,7 @@ def test_bfs_for_latest_version_in_history():
29
29
  v1_commit = Commit(repo, binsha=b"0" * 20)
30
30
 
31
31
  class TagReferenceOverride(TagReference):
32
- commit = v1_commit # type: ignore - mocking the commit property
32
+ commit = v1_commit # mocking the commit property
33
33
 
34
34
  v1_tag = TagReferenceOverride(repo, "refs/tags/v1.0.0", check_path=False)
35
35
 
@@ -25,6 +25,7 @@ if TYPE_CHECKING:
25
25
  try:
26
26
  from typing import TypeAlias
27
27
  except ImportError:
28
+ # for python 3.8 and 3.9
28
29
  from typing_extensions import TypeAlias
29
30
 
30
31
  from unittest.mock import MagicMock
@@ -56,7 +57,7 @@ def remove_dir_tree(directory: Path | str = ".", force: bool = False) -> None:
56
57
  read-only permissions
57
58
  """
58
59
 
59
- def on_read_only_error(func, path, exc_info):
60
+ def on_read_only_error(_func, path, _exc_info):
60
61
  os.chmod(path, stat.S_IWRITE)
61
62
  os.unlink(path)
62
63