python-semantic-release 9.8.7__tar.gz → 9.8.8__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 (148) hide show
  1. {python_semantic_release-9.8.7/python_semantic_release.egg-info → python_semantic_release-9.8.8}/PKG-INFO +1 -1
  2. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/automatic-releases/github-actions.rst +3 -3
  3. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/configuration.rst +2 -2
  4. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/github-action.rst +1 -1
  5. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/pyproject.toml +2 -1
  6. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8/python_semantic_release.egg-info}/PKG-INFO +1 -1
  7. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/__init__.py +1 -1
  8. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/version.py +2 -2
  9. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/config.py +12 -2
  10. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_changelog.py +50 -14
  11. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_version.py +35 -25
  12. python_semantic_release-9.8.8/tests/conftest.py +135 -0
  13. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/const.py +7 -6
  14. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/scenario/test_release_history.py +5 -2
  15. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_config.py +3 -2
  16. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_gitea.py +57 -47
  17. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_github.py +55 -50
  18. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/util.py +4 -0
  19. python_semantic_release-9.8.7/tests/conftest.py +0 -98
  20. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/AUTHORS.rst +0 -0
  21. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/LICENSE +0 -0
  22. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/MANIFEST.in +0 -0
  23. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/README.rst +0 -0
  24. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/Makefile +0 -0
  25. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/algorithm.rst +0 -0
  26. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/automatic-releases/cronjobs.rst +0 -0
  27. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/automatic-releases/index.rst +0 -0
  28. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/automatic-releases/travis.rst +0 -0
  29. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/changelog_templates.rst +0 -0
  30. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/commands.rst +0 -0
  31. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/commit-parsing.rst +0 -0
  32. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/conf.py +0 -0
  33. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/contributing.rst +0 -0
  34. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/contributors.rst +0 -0
  35. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/index.rst +0 -0
  36. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/make.bat +0 -0
  37. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/migrating_from_v7.rst +0 -0
  38. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/multibranch_releases.rst +0 -0
  39. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/strict_mode.rst +0 -0
  40. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/docs/troubleshooting.rst +0 -0
  41. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/SOURCES.txt +0 -0
  42. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/dependency_links.txt +0 -0
  43. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/entry_points.txt +0 -0
  44. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/requires.txt +0 -0
  45. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/python_semantic_release.egg-info/top_level.txt +0 -0
  46. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/__main__.py +0 -0
  47. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/changelog/__init__.py +0 -0
  48. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/changelog/context.py +0 -0
  49. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/changelog/release_history.py +0 -0
  50. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/changelog/template.py +0 -0
  51. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/__init__.py +0 -0
  52. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/changelog_writer.py +0 -0
  53. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/cli_context.py +0 -0
  54. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/__init__.py +0 -0
  55. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/changelog.py +0 -0
  56. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/generate_config.py +0 -0
  57. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/main.py +0 -0
  58. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/commands/publish.py +0 -0
  59. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/const.py +0 -0
  60. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/github_actions_output.py +0 -0
  61. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/masking_filter.py +0 -0
  62. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/cli/util.py +0 -0
  63. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/__init__.py +0 -0
  64. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/_base.py +0 -0
  65. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/angular.py +0 -0
  66. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/emoji.py +0 -0
  67. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/scipy.py +0 -0
  68. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/tag.py +0 -0
  69. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/token.py +0 -0
  70. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/commit_parser/util.py +0 -0
  71. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/const.py +0 -0
  72. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/data/templates/CHANGELOG.md.j2 +0 -0
  73. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/data/templates/release_notes.md.j2 +0 -0
  74. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/enums.py +0 -0
  75. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/errors.py +0 -0
  76. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/gitproject.py +0 -0
  77. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/helpers.py +0 -0
  78. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/__init__.py +0 -0
  79. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/_base.py +0 -0
  80. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/bitbucket.py +0 -0
  81. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/gitea.py +0 -0
  82. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/github.py +0 -0
  83. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/gitlab.py +0 -0
  84. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/remote_hvcs_base.py +0 -0
  85. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/token_auth.py +0 -0
  86. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/hvcs/util.py +0 -0
  87. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/version/__init__.py +0 -0
  88. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/version/algorithm.py +0 -0
  89. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/version/declaration.py +0 -0
  90. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/version/translator.py +0 -0
  91. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/semantic_release/version/version.py +0 -0
  92. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/setup.cfg +0 -0
  93. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/__init__.py +0 -0
  94. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/__init__.py +0 -0
  95. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/conftest.py +0 -0
  96. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_generate_config.py +0 -0
  97. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_help.py +0 -0
  98. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_main.py +0 -0
  99. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/command_line/test_publish.py +0 -0
  100. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/__init__.py +0 -0
  101. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/commit_parsers.py +0 -0
  102. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/example_project.py +0 -0
  103. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/git_repo.py +0 -0
  104. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/__init__.py +0 -0
  105. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/__init__.py +0 -0
  106. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/repo_w_2_release_channels.py +0 -0
  107. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/git_flow/repo_w_3_release_channels.py +0 -0
  108. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/github_flow/__init__.py +0 -0
  109. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/github_flow/repo_w_release_channels.py +0 -0
  110. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/__init__.py +0 -0
  111. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_no_tags.py +0 -0
  112. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_prereleases.py +0 -0
  113. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/repos/trunk_based_dev/repo_w_tags.py +0 -0
  114. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/fixtures/scipy.py +0 -0
  115. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/scenario/__init__.py +0 -0
  116. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/scenario/test_next_version.py +0 -0
  117. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/scenario/test_template_render.py +0 -0
  118. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/__init__.py +0 -0
  119. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/__init__.py +0 -0
  120. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/__init__.py +0 -0
  121. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_changelog_context.py +0 -0
  122. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_default_changelog.py +0 -0
  123. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_release_notes.py +0 -0
  124. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/changelog/test_template.py +0 -0
  125. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/__init__.py +0 -0
  126. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_github_actions_output.py +0 -0
  127. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_masking_filter.py +0 -0
  128. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_util.py +0 -0
  129. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/cli/test_version.py +0 -0
  130. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/__init__.py +0 -0
  131. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_angular.py +0 -0
  132. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_emoji.py +0 -0
  133. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_parsed_commit.py +0 -0
  134. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_scipy.py +0 -0
  135. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_tag.py +0 -0
  136. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/commit_parser/test_util.py +0 -0
  137. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/__init__.py +0 -0
  138. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test__base.py +0 -0
  139. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_bitbucket.py +0 -0
  140. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_gitlab.py +0 -0
  141. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_token_auth.py +0 -0
  142. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/hvcs/test_util.py +0 -0
  143. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/test_helpers.py +0 -0
  144. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/__init__.py +0 -0
  145. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_algorithm.py +0 -0
  146. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_declaration.py +0 -0
  147. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/tests/unit/semantic_release/version/test_translator.py +0 -0
  148. {python_semantic_release-9.8.7 → python_semantic_release-9.8.8}/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.8.7
3
+ Version: 9.8.8
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 @@ Example Workflow
53
53
  - name: Python Semantic Release
54
54
  # Adjust tag with desired version if applicable. Version shorthand
55
55
  # is NOT available, e.g. vX or vX.X will not work.
56
- uses: python-semantic-release/python-semantic-release@v9.8.7
56
+ uses: python-semantic-release/python-semantic-release@v9.8.8
57
57
  with:
58
58
  github_token: ${{ secrets.GITHUB_TOKEN }}
59
59
 
@@ -94,13 +94,13 @@ multiple projects.
94
94
  .. code:: yaml
95
95
 
96
96
  - name: Release Project 1
97
- uses: python-semantic-release/python-semantic-release@v9.8.7
97
+ uses: python-semantic-release/python-semantic-release@v9.8.8
98
98
  with:
99
99
  directory: ./project1
100
100
  github_token: ${{ secrets.GITHUB_TOKEN }}
101
101
 
102
102
  - name: Release Project 2
103
- uses: python-semantic-release/python-semantic-release@v9.8.7
103
+ uses: python-semantic-release/python-semantic-release@v9.8.8
104
104
  with:
105
105
  directory: ./project2
106
106
  github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -216,13 +216,13 @@ ALLUSERSAPPDATA Pass-through ``ALLUSERAPPDATA`` if exists in process e
216
216
  ALLUSERSPROFILE Pass-through ``ALLUSERSPPPROFILE`` if exists in process env, unset otherwise
217
217
  APPDATA Pass-through ``APPDATA`` if exists in process env, unset otherwise
218
218
  COMMONPROGRAMFILES Pass-through ``COMMONPROGRAMFILES`` if exists in process env, unset otherwise
219
- COMMONPROGRAMFILES(x86) Pass-through ``COMMONPROGRAMFILES(x86)`` if exists in process env, unset otherwise
219
+ COMMONPROGRAMFILES(X86) Pass-through ``COMMONPROGRAMFILES(X86)`` if exists in process env, unset otherwise
220
220
  DEFAULTUSERPROFILE Pass-through ``DEFAULTUSERPROFILE`` if exists in process env, unset otherwise
221
221
  HOMEPATH Pass-through ``HOMEPATH`` if exists in process env, unset otherwise
222
222
  PATHEXT Pass-through ``PATHEXT`` if exists in process env, unset otherwise
223
223
  PROFILESFOLDER Pass-through ``PROFILESFOLDER`` if exists in process env, unset otherwise
224
224
  PROGRAMFILES Pass-through ``PROGRAMFILES`` if exists in process env, unset otherwise
225
- PROGRAMFILES(x86) Pass-through ``PROGRAMFILES(x86)`` if exists in process env, unset otherwise
225
+ PROGRAMFILES(X86) Pass-through ``PROGRAMFILES(X86)`` if exists in process env, unset otherwise
226
226
  SYSTEM Pass-through ``SYSTEM`` if exists in process env, unset otherwise
227
227
  SYSTEM16 Pass-through ``SYSTEM16`` if exists in process env, unset otherwise
228
228
  SYSTEM32 Pass-through ``SYSTEM32`` if exists in process env, unset otherwise
@@ -131,7 +131,7 @@ provide the following inputs:
131
131
  - name: Python Semantic Release
132
132
  # Adjust tag with desired version if applicable. Version shorthand
133
133
  # is NOT available, e.g. vX or vX.X will not work.
134
- uses: python-semantic-release/python-semantic-release@v9.8.7
134
+ uses: python-semantic-release/python-semantic-release@v9.8.8
135
135
  with:
136
136
  # ... other options
137
137
  force: "patch"
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "python-semantic-release"
9
- version = "9.8.7"
9
+ version = "9.8.8"
10
10
  description = "Automatic Semantic Versioning for Python projects"
11
11
  requires-python = ">=3.8"
12
12
  license = { text = "MIT" }
@@ -376,6 +376,7 @@ logging_use_named_masks = true
376
376
  commit_parser = "angular"
377
377
  build_command = """
378
378
  python -m scripts.bump_version_in_docs
379
+ git add docs/*
379
380
  python -m pip install -e .[build]
380
381
  python -m build .
381
382
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-semantic-release
3
- Version: 9.8.7
3
+ Version: 9.8.8
4
4
  Summary: Automatic Semantic Versioning for Python projects
5
5
  Author-email: Rolf Erik Lekang <me@rolflekang.com>
6
6
  License: MIT
@@ -24,7 +24,7 @@ from semantic_release.version import (
24
24
  tags_and_versions,
25
25
  )
26
26
 
27
- __version__ = "9.8.7"
27
+ __version__ = "9.8.8"
28
28
 
29
29
  __all__ = [
30
30
  "CommitParser",
@@ -189,13 +189,13 @@ def get_windows_env() -> Mapping[str, str | None]:
189
189
  "ALLUSERSPROFILE",
190
190
  "APPDATA",
191
191
  "COMMONPROGRAMFILES",
192
- "COMMONPROGRAMFILES(x86)",
192
+ "COMMONPROGRAMFILES(X86)",
193
193
  "DEFAULTUSERPROFILE",
194
194
  "HOMEPATH",
195
195
  "PATHEXT",
196
196
  "PROFILESFOLDER",
197
197
  "PROGRAMFILES",
198
- "PROGRAMFILES(x86)",
198
+ "PROGRAMFILES(X86)",
199
199
  "SYSTEM",
200
200
  "SYSTEM16",
201
201
  "SYSTEM32",
@@ -568,7 +568,12 @@ class RuntimeContext:
568
568
  )
569
569
 
570
570
  # changelog_file
571
- changelog_file = Path(raw.changelog.changelog_file).expanduser().resolve()
571
+ # Must use absolute after resolve because windows does not resolve if the path does not exist
572
+ # which means it returns a relative path. So we force absolute to ensure path is complete
573
+ # for the next check of path matching
574
+ changelog_file = (
575
+ Path(raw.changelog.changelog_file).expanduser().resolve().absolute()
576
+ )
572
577
 
573
578
  # Prevent path traversal attacks
574
579
  if raw.repo_dir not in changelog_file.parents:
@@ -576,7 +581,12 @@ class RuntimeContext:
576
581
  "Changelog file destination must be inside of the repository directory."
577
582
  )
578
583
 
579
- template_dir = Path(raw.changelog.template_dir).expanduser().resolve()
584
+ # Must use absolute after resolve because windows does not resolve if the path does not exist
585
+ # which means it returns a relative path. So we force absolute to ensure path is complete
586
+ # for the next check of path matching
587
+ template_dir = (
588
+ Path(raw.changelog.template_dir).expanduser().resolve().absolute()
589
+ )
580
590
 
581
591
  # Prevent path traversal attacks
582
592
  if raw.repo_dir not in template_dir.parents:
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import filecmp
4
4
  import os
5
5
  import shutil
6
+ import sys
6
7
  from typing import TYPE_CHECKING
7
8
  from unittest import mock
8
9
 
@@ -11,6 +12,7 @@ import requests_mock
11
12
  from pytest_lazy_fixtures.lazy_fixture import lf as lazy_fixture
12
13
  from requests import Session
13
14
 
15
+ import semantic_release.hvcs.github
14
16
  from semantic_release.cli.commands.main import main
15
17
 
16
18
  from tests.const import (
@@ -226,17 +228,7 @@ def test_changelog_release_tag_not_in_history(
226
228
  repo_with_single_branch_and_prereleases_angular_commits.__name__
227
229
  )
228
230
  @pytest.mark.parametrize("args", [("--post-to-release-tag", "v0.1.0")])
229
- def test_changelog_post_to_release(
230
- args: list[str],
231
- monkeypatch: pytest.MonkeyPatch,
232
- tmp_path_factory: pytest.TempPathFactory,
233
- example_project_dir: ExProjectDir,
234
- cli_runner: CliRunner,
235
- ):
236
- tempdir = tmp_path_factory.mktemp("test_changelog")
237
- remove_dir_tree(tempdir.resolve(), force=True)
238
- shutil.copytree(src=str(example_project_dir.resolve()), dst=tempdir)
239
-
231
+ def test_changelog_post_to_release(args: list[str], cli_runner: CliRunner):
240
232
  # Set up a requests HTTP session so we can catch the HTTP calls and ensure they're
241
233
  # made
242
234
 
@@ -256,19 +248,63 @@ def test_changelog_post_to_release(
256
248
  repo_name=EXAMPLE_REPO_NAME,
257
249
  )
258
250
 
251
+ clean_os_environment = dict(
252
+ filter(
253
+ lambda k_v: k_v[1] is not None,
254
+ {
255
+ "CI": "true",
256
+ "PATH": os.getenv("PATH"),
257
+ "HOME": os.getenv("HOME"),
258
+ "VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", "./.venv"),
259
+ **(
260
+ {}
261
+ if sys.platform != "win32"
262
+ else {
263
+ # Windows Required variables
264
+ "ALLUSERSAPPDATA": os.getenv("ALLUSERSAPPDATA"),
265
+ "ALLUSERSPROFILE": os.getenv("ALLUSERSPROFILE"),
266
+ "APPDATA": os.getenv("APPDATA"),
267
+ "COMMONPROGRAMFILES": os.getenv("COMMONPROGRAMFILES"),
268
+ "COMMONPROGRAMFILES(X86)": os.getenv("COMMONPROGRAMFILES(X86)"),
269
+ "DEFAULTUSERPROFILE": os.getenv("DEFAULTUSERPROFILE"),
270
+ "HOMEPATH": os.getenv("HOMEPATH"),
271
+ "PATHEXT": os.getenv("PATHEXT"),
272
+ "PROFILESFOLDER": os.getenv("PROFILESFOLDER"),
273
+ "PROGRAMFILES": os.getenv("PROGRAMFILES"),
274
+ "PROGRAMFILES(X86)": os.getenv("PROGRAMFILES(X86)"),
275
+ "SYSTEM": os.getenv("SYSTEM"),
276
+ "SYSTEM16": os.getenv("SYSTEM16"),
277
+ "SYSTEM32": os.getenv("SYSTEM32"),
278
+ "SYSTEMDRIVE": os.getenv("SYSTEMDRIVE"),
279
+ "SYSTEMROOT": os.getenv("SYSTEMROOT"),
280
+ "TEMP": os.getenv("TEMP"),
281
+ "TMP": os.getenv("TMP"),
282
+ "USERPROFILE": os.getenv("USERPROFILE"),
283
+ "USERSID": os.getenv("USERSID"),
284
+ "USERNAME": os.getenv("USERNAME"),
285
+ "WINDIR": os.getenv("WINDIR"),
286
+ }
287
+ ),
288
+ }.items(),
289
+ )
290
+ )
291
+
259
292
  # Patch out env vars that affect changelog URLs but only get set in e.g.
260
293
  # Github actions
261
294
  with mock.patch(
262
- "semantic_release.hvcs.github.build_requests_session",
295
+ # Patching the specific module's reference to the build_requests_session function
296
+ f"{semantic_release.hvcs.github.__name__}.{semantic_release.hvcs.github.build_requests_session.__name__}",
263
297
  return_value=session,
264
- ) as mocker, mock.patch.dict("os.environ", {}, clear=True):
298
+ ) as build_requests_session_mock, mock.patch.dict(
299
+ os.environ, clean_os_environment, clear=True
300
+ ):
265
301
  # Act
266
302
  cli_cmd = [MAIN_PROG_NAME, CHANGELOG_SUBCMD, *args]
267
303
  result = cli_runner.invoke(main, cli_cmd[1:])
268
304
 
269
305
  # Evaluate
270
306
  assert_successful_exit_code(result, cli_cmd)
271
- assert mocker.called
307
+ assert build_requests_session_mock.called
272
308
  assert mock_adapter.called
273
309
  assert mock_adapter.last_request is not None
274
310
  assert expected_request_url == mock_adapter.last_request.url
@@ -5,6 +5,7 @@ import filecmp
5
5
  import os
6
6
  import re
7
7
  import shutil
8
+ import subprocess
8
9
  from pathlib import Path
9
10
  from subprocess import CompletedProcess
10
11
  from textwrap import dedent
@@ -37,6 +38,7 @@ from tests.util import (
37
38
  assert_exit_code,
38
39
  assert_successful_exit_code,
39
40
  flatten_dircmp,
41
+ get_func_qual_name,
40
42
  get_release_history_from_context,
41
43
  remove_dir_tree,
42
44
  )
@@ -513,7 +515,7 @@ def test_version_no_push_force_level(
513
515
  [
514
516
  "CHANGELOG.md",
515
517
  "pyproject.toml",
516
- f"src/{EXAMPLE_PROJECT_NAME}/_version.py",
518
+ str(Path(f"src/{EXAMPLE_PROJECT_NAME}/_version.py")),
517
519
  ]
518
520
  )
519
521
 
@@ -671,9 +673,9 @@ def test_version_runs_build_command(
671
673
  exe = shell.split("/")[-1]
672
674
  patched_os_environment = {
673
675
  "CI": "true",
674
- "PATH": os.getenv("PATH"),
675
- "HOME": os.getenv("HOME"),
676
- "VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", "./.venv"),
676
+ "PATH": os.getenv("PATH", ""),
677
+ "HOME": "/home/username",
678
+ "VIRTUAL_ENV": "./.venv",
677
679
  # Simulate that all CI's are set
678
680
  "GITHUB_ACTIONS": "true",
679
681
  "GITLAB_CI": "true",
@@ -685,13 +687,13 @@ def test_version_runs_build_command(
685
687
  "ALLUSERSPROFILE": "C:\\ProgramData",
686
688
  "APPDATA": "C:\\Users\\Username\\AppData\\Roaming",
687
689
  "COMMONPROGRAMFILES": "C:\\Program Files\\Common Files",
688
- "COMMONPROGRAMFILES(x86)": "C:\\Program Files (x86)\\Common Files",
690
+ "COMMONPROGRAMFILES(X86)": "C:\\Program Files (x86)\\Common Files",
689
691
  "DEFAULTUSERPROFILE": "C:\\Users\\Default",
690
692
  "HOMEPATH": "\\Users\\Username",
691
693
  "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
692
694
  "PROFILESFOLDER": "C:\\Users",
693
695
  "PROGRAMFILES": "C:\\Program Files",
694
- "PROGRAMFILES(x86)": "C:\\Program Files (x86)",
696
+ "PROGRAMFILES(X86)": "C:\\Program Files (x86)",
695
697
  "SYSTEM": "C:\\Windows\\System32",
696
698
  "SYSTEM16": "C:\\Windows\\System16",
697
699
  "SYSTEM32": "C:\\Windows\\System32",
@@ -701,16 +703,18 @@ def test_version_runs_build_command(
701
703
  "TMP": "C:\\Users\\Username\\AppData\\Local\\Temp",
702
704
  "USERPROFILE": "C:\\Users\\Username",
703
705
  "USERSID": "S-1-5-21-1234567890-123456789-123456789-1234",
706
+ "USERNAME": "Username", # must include for python getpass.getuser() on windows
704
707
  "WINDIR": "C:\\Windows",
705
708
  }
706
709
 
707
710
  # Mock out subprocess.run
708
711
  with mock.patch(
709
- "subprocess.run", return_value=CompletedProcess(args=(), returncode=0)
712
+ get_func_qual_name(subprocess.run),
713
+ return_value=CompletedProcess(args=(), returncode=0),
710
714
  ) as patched_subprocess_run, mock.patch(
711
715
  "shellingham.detect_shell", return_value=(exe, shell)
712
716
  ), mock.patch("sys.platform", "linux"), mock.patch.dict(
713
- "os.environ", patched_os_environment, clear=True
717
+ os.environ, patched_os_environment, clear=True
714
718
  ):
715
719
  cli_cmd = [MAIN_PROG_NAME, VERSION_SUBCMD, "--patch", "--no-push"]
716
720
 
@@ -752,9 +756,9 @@ def test_version_runs_build_command_windows(
752
756
  exe = shell.split("/")[-1]
753
757
  patched_os_environment = {
754
758
  "CI": "true",
755
- "PATH": os.getenv("PATH"),
756
- "HOME": os.getenv("HOME"),
757
- "VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", "./.venv"),
759
+ "PATH": os.getenv("PATH", ""),
760
+ "HOME": "/home/username",
761
+ "VIRTUAL_ENV": "./.venv",
758
762
  # Simulate that all CI's are set
759
763
  "GITHUB_ACTIONS": "true",
760
764
  "GITLAB_CI": "true",
@@ -766,13 +770,13 @@ def test_version_runs_build_command_windows(
766
770
  "ALLUSERSPROFILE": "C:\\ProgramData",
767
771
  "APPDATA": "C:\\Users\\Username\\AppData\\Roaming",
768
772
  "COMMONPROGRAMFILES": "C:\\Program Files\\Common Files",
769
- "COMMONPROGRAMFILES(x86)": "C:\\Program Files (x86)\\Common Files",
773
+ "COMMONPROGRAMFILES(X86)": "C:\\Program Files (x86)\\Common Files",
770
774
  "DEFAULTUSERPROFILE": "C:\\Users\\Default",
771
775
  "HOMEPATH": "\\Users\\Username",
772
776
  "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
773
777
  "PROFILESFOLDER": "C:\\Users",
774
778
  "PROGRAMFILES": "C:\\Program Files",
775
- "PROGRAMFILES(x86)": "C:\\Program Files (x86)",
779
+ "PROGRAMFILES(X86)": "C:\\Program Files (x86)",
776
780
  "SYSTEM": "C:\\Windows\\System32",
777
781
  "SYSTEM16": "C:\\Windows\\System16",
778
782
  "SYSTEM32": "C:\\Windows\\System32",
@@ -782,16 +786,18 @@ def test_version_runs_build_command_windows(
782
786
  "TMP": "C:\\Users\\Username\\AppData\\Local\\Temp",
783
787
  "USERPROFILE": "C:\\Users\\Username",
784
788
  "USERSID": "S-1-5-21-1234567890-123456789-123456789-1234",
789
+ "USERNAME": "Username", # must include for python getpass.getuser() on windows
785
790
  "WINDIR": "C:\\Windows",
786
791
  }
787
792
 
788
793
  # Mock out subprocess.run
789
794
  with mock.patch(
790
- "subprocess.run", return_value=CompletedProcess(args=(), returncode=0)
795
+ get_func_qual_name(subprocess.run),
796
+ return_value=CompletedProcess(args=(), returncode=0),
791
797
  ) as patched_subprocess_run, mock.patch(
792
798
  "shellingham.detect_shell", return_value=(exe, shell)
793
799
  ), mock.patch("sys.platform", "win32"), mock.patch.dict(
794
- "os.environ", patched_os_environment, clear=True
800
+ os.environ, patched_os_environment, clear=True
795
801
  ):
796
802
  cli_cmd = [MAIN_PROG_NAME, VERSION_SUBCMD, "--patch", "--no-push"]
797
803
 
@@ -821,15 +827,15 @@ def test_version_runs_build_command_windows(
821
827
  "ALLUSERSPROFILE": patched_os_environment["ALLUSERSPROFILE"],
822
828
  "APPDATA": patched_os_environment["APPDATA"],
823
829
  "COMMONPROGRAMFILES": patched_os_environment["COMMONPROGRAMFILES"],
824
- "COMMONPROGRAMFILES(x86)": patched_os_environment[
825
- "COMMONPROGRAMFILES(x86)"
830
+ "COMMONPROGRAMFILES(X86)": patched_os_environment[
831
+ "COMMONPROGRAMFILES(X86)"
826
832
  ],
827
833
  "DEFAULTUSERPROFILE": patched_os_environment["DEFAULTUSERPROFILE"],
828
834
  "HOMEPATH": patched_os_environment["HOMEPATH"],
829
835
  "PATHEXT": patched_os_environment["PATHEXT"],
830
836
  "PROFILESFOLDER": patched_os_environment["PROFILESFOLDER"],
831
837
  "PROGRAMFILES": patched_os_environment["PROGRAMFILES"],
832
- "PROGRAMFILES(x86)": patched_os_environment["PROGRAMFILES(x86)"],
838
+ "PROGRAMFILES(X86)": patched_os_environment["PROGRAMFILES(X86)"],
833
839
  "SYSTEM": patched_os_environment["SYSTEM"],
834
840
  "SYSTEM16": patched_os_environment["SYSTEM16"],
835
841
  "SYSTEM32": patched_os_environment["SYSTEM32"],
@@ -852,9 +858,11 @@ def test_version_runs_build_command_w_user_env(
852
858
  # Setup
853
859
  patched_os_environment = {
854
860
  "CI": "true",
855
- "PATH": os.getenv("PATH"),
856
- "HOME": os.getenv("HOME"),
857
- "VIRTUAL_ENV": os.getenv("VIRTUAL_ENV", "./.venv"),
861
+ "PATH": os.getenv("PATH", ""),
862
+ "HOME": "/home/username",
863
+ "VIRTUAL_ENV": "./.venv",
864
+ # Windows
865
+ "USERNAME": "Username", # must include for python getpass.getuser() on windows
858
866
  # Simulate that all CI's are set
859
867
  "GITHUB_ACTIONS": "true",
860
868
  "GITLAB_CI": "true",
@@ -884,10 +892,11 @@ def test_version_runs_build_command_w_user_env(
884
892
 
885
893
  # Mock out subprocess.run
886
894
  with mock.patch(
887
- "subprocess.run", return_value=CompletedProcess(args=(), returncode=0)
895
+ get_func_qual_name(subprocess.run),
896
+ return_value=CompletedProcess(args=(), returncode=0),
888
897
  ) as patched_subprocess_run, mock.patch(
889
898
  "shellingham.detect_shell", return_value=("bash", "/usr/bin/bash")
890
- ), mock.patch.dict("os.environ", patched_os_environment, clear=True):
899
+ ), mock.patch.dict(os.environ, patched_os_environment, clear=True):
891
900
  cli_cmd = [
892
901
  MAIN_PROG_NAME,
893
902
  VERSION_SUBCMD,
@@ -938,7 +947,8 @@ def test_version_skips_build_command_with_skip_build(
938
947
  cli_cmd = [MAIN_PROG_NAME, VERSION_SUBCMD, "--patch", "--no-push", "--skip-build"]
939
948
 
940
949
  with mock.patch(
941
- "subprocess.run", return_value=CompletedProcess(args=(), returncode=0)
950
+ get_func_qual_name(subprocess.run),
951
+ return_value=CompletedProcess(args=(), returncode=0),
942
952
  ) as patched_subprocess_run:
943
953
  # Act: force a new version
944
954
  result = cli_runner.invoke(main, cli_cmd[1:])
@@ -1159,7 +1169,7 @@ def test_version_only_update_files_no_git_actions(
1159
1169
  [
1160
1170
  "CHANGELOG.md",
1161
1171
  "pyproject.toml",
1162
- f"src/{EXAMPLE_PROJECT_NAME}/_version.py",
1172
+ str(Path(f"src/{EXAMPLE_PROJECT_NAME}/_version.py")),
1163
1173
  ]
1164
1174
  )
1165
1175
  assert expected_changed_files == differing_files
@@ -0,0 +1,135 @@
1
+ """Note: fixtures are stored in the tests/fixtures directory for better organisation"""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+ from pathlib import Path
8
+ from tempfile import NamedTemporaryFile
9
+ from typing import TYPE_CHECKING
10
+
11
+ import pytest
12
+ from git import Commit, Repo
13
+
14
+ from tests.fixtures import *
15
+ from tests.util import remove_dir_tree
16
+
17
+ if TYPE_CHECKING:
18
+ from tempfile import _TemporaryFileWrapper
19
+ from typing import Generator, Protocol
20
+
21
+ class MakeCommitObjFn(Protocol):
22
+ def __call__(self, message: str) -> Commit: ...
23
+
24
+ class NetrcFileFn(Protocol):
25
+ def __call__(self, machine: str) -> _TemporaryFileWrapper[str]: ...
26
+
27
+ class TeardownCachedDirFn(Protocol):
28
+ def __call__(self, directory: Path) -> Path: ...
29
+
30
+
31
+ @pytest.fixture(scope="session")
32
+ def default_netrc_username() -> str:
33
+ return "username"
34
+
35
+
36
+ @pytest.fixture(scope="session")
37
+ def default_netrc_password() -> str:
38
+ return "password"
39
+
40
+
41
+ @pytest.fixture(scope="session")
42
+ def netrc_file(
43
+ default_netrc_username: str,
44
+ default_netrc_password: str,
45
+ ) -> Generator[NetrcFileFn, None, None]:
46
+ temporary_files: list[str] = []
47
+
48
+ def _netrc_file(machine: str) -> _TemporaryFileWrapper[str]:
49
+ ctx_mgr = NamedTemporaryFile("w", delete=False)
50
+ with ctx_mgr as netrc_fd:
51
+ temporary_files.append(ctx_mgr.name)
52
+
53
+ netrc_fd.write(f"machine {machine}{os.linesep}")
54
+ netrc_fd.write(f"login {default_netrc_username}{os.linesep}")
55
+ netrc_fd.write(f"password {default_netrc_password}{os.linesep}")
56
+ netrc_fd.flush()
57
+ return ctx_mgr
58
+
59
+ try:
60
+ yield _netrc_file
61
+ finally:
62
+ for temp_file in temporary_files:
63
+ os.unlink(temp_file)
64
+
65
+
66
+ @pytest.fixture(scope="session")
67
+ def cached_files_dir(tmp_path_factory: pytest.TempPathFactory) -> Path:
68
+ return tmp_path_factory.mktemp("cached_files_dir")
69
+
70
+
71
+ @pytest.fixture(scope="session")
72
+ def teardown_cached_dir() -> Generator[TeardownCachedDirFn, None, None]:
73
+ directories: list[Path] = []
74
+
75
+ def _teardown_cached_dir(directory: Path | str) -> Path:
76
+ directories.append(Path(directory))
77
+ return directories[-1]
78
+
79
+ try:
80
+ yield _teardown_cached_dir
81
+ finally:
82
+ # clean up any registered cached directories
83
+ for directory in directories:
84
+ if directory.exists():
85
+ remove_dir_tree(directory, force=True)
86
+
87
+
88
+ @pytest.fixture(scope="session")
89
+ def make_commit_obj() -> MakeCommitObjFn:
90
+ def _make_commit(message: str) -> Commit:
91
+ return Commit(repo=Repo(), binsha=Commit.NULL_BIN_SHA, message=message)
92
+
93
+ return _make_commit
94
+
95
+
96
+ @pytest.fixture(scope="session")
97
+ def clean_os_environment() -> dict[str, str]:
98
+ return dict( # type: ignore
99
+ filter(
100
+ lambda k_v: k_v[1] is not None,
101
+ {
102
+ "PATH": os.getenv("PATH"),
103
+ "HOME": os.getenv("HOME"),
104
+ **(
105
+ {}
106
+ if sys.platform != "win32"
107
+ else {
108
+ # Windows Required variables
109
+ "ALLUSERSAPPDATA": os.getenv("ALLUSERSAPPDATA"),
110
+ "ALLUSERSPROFILE": os.getenv("ALLUSERSPROFILE"),
111
+ "APPDATA": os.getenv("APPDATA"),
112
+ "COMMONPROGRAMFILES": os.getenv("COMMONPROGRAMFILES"),
113
+ "COMMONPROGRAMFILES(X86)": os.getenv("COMMONPROGRAMFILES(X86)"),
114
+ "DEFAULTUSERPROFILE": os.getenv("DEFAULTUSERPROFILE"),
115
+ "HOMEPATH": os.getenv("HOMEPATH"),
116
+ "PATHEXT": os.getenv("PATHEXT"),
117
+ "PROFILESFOLDER": os.getenv("PROFILESFOLDER"),
118
+ "PROGRAMFILES": os.getenv("PROGRAMFILES"),
119
+ "PROGRAMFILES(X86)": os.getenv("PROGRAMFILES(X86)"),
120
+ "SYSTEM": os.getenv("SYSTEM"),
121
+ "SYSTEM16": os.getenv("SYSTEM16"),
122
+ "SYSTEM32": os.getenv("SYSTEM32"),
123
+ "SYSTEMDRIVE": os.getenv("SYSTEMDRIVE"),
124
+ "SYSTEMROOT": os.getenv("SYSTEMROOT"),
125
+ "TEMP": os.getenv("TEMP"),
126
+ "TMP": os.getenv("TMP"),
127
+ "USERPROFILE": os.getenv("USERPROFILE"),
128
+ "USERSID": os.getenv("USERSID"),
129
+ "USERNAME": os.getenv("USERNAME"),
130
+ "WINDIR": os.getenv("WINDIR"),
131
+ }
132
+ ),
133
+ }.items(),
134
+ )
135
+ )
@@ -138,7 +138,7 @@ version_variables = [
138
138
  "src/{EXAMPLE_PROJECT_NAME}/_version.py:__version__",
139
139
  ]
140
140
  version_toml = ["pyproject.toml:tool.poetry.version"]
141
- """
141
+ """.lstrip()
142
142
 
143
143
  EXAMPLE_SETUP_CFG_CONTENT = rf"""
144
144
  [metadata]
@@ -202,7 +202,7 @@ line_length=88
202
202
 
203
203
  [flake8]
204
204
  max-line-length = 88
205
- """
205
+ """.lstrip()
206
206
 
207
207
  EXAMPLE_SETUP_PY_CONTENT = rf"""
208
208
  import re
@@ -284,7 +284,7 @@ setup(
284
284
  "Programming Language :: Python :: 3.9",
285
285
  ],
286
286
  )
287
- """
287
+ """.lstrip()
288
288
 
289
289
  EXAMPLE_CHANGELOG_MD_CONTENT = r"""
290
290
  # CHANGELOG.md
@@ -295,15 +295,16 @@ EXAMPLE_CHANGELOG_MD_CONTENT = r"""
295
295
  * Various bugfixes, security enhancements
296
296
  * Extra cookies to enhance your experience
297
297
  * ~Removed~ simplified cookie opt-out handling logic
298
- """
298
+ """.lstrip()
299
299
 
300
- EXAMPLE_RELEASE_NOTES_TEMPLATE = r"""## What's Changed
300
+ EXAMPLE_RELEASE_NOTES_TEMPLATE = r"""
301
+ ## What's Changed
301
302
  {% for type_, commits in release["elements"] | dictsort %}
302
303
  ### {{ type_ | capitalize }}
303
304
  {%- if type_ != "unknown" %}
304
305
  {% for commit in commits %}
305
306
  * {{ commit.commit.summary.rstrip() }} ([`{{ commit.short_hash }}`]({{ commit.hexsha | commit_hash_url }}))
306
307
  {%- endfor %}{% endif %}{% endfor %}
307
- """ # noqa: E501
308
+ """.lstrip() # noqa: E501
308
309
 
309
310
  RELEASE_NOTES = "# Release Notes"
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from datetime import datetime
4
- from typing import NamedTuple
4
+ from typing import TYPE_CHECKING, NamedTuple
5
5
 
6
6
  import pytest
7
7
  from git import Actor
@@ -22,6 +22,9 @@ from tests.fixtures import (
22
22
  )
23
23
  from tests.util import add_text_to_file
24
24
 
25
+ if TYPE_CHECKING:
26
+ from git import Repo
27
+
25
28
  # NOTE: not testing parser correctness here, just that the right commits end up
26
29
  # in the right places. So we only compare that the commits with the messages
27
30
  # we anticipate are in the right place, rather than by hash
@@ -315,7 +318,7 @@ def test_release_history(
315
318
  lazy_fixture(repo_with_git_flow_and_release_channels_angular_commits.__name__),
316
319
  ],
317
320
  )
318
- def test_release_history_releases(repo, default_angular_parser):
321
+ def test_release_history_releases(repo: Repo, default_angular_parser):
319
322
  new_version = Version.parse("100.10.1")
320
323
  actor = Actor("semantic-release", "semantic-release")
321
324
  release_history = ReleaseHistory.from_git_history(