From b053a7e65fc793a4e92378064f59be7eb032cb83 Mon Sep 17 00:00:00 2001 From: Kurt von Laven Date: Wed, 7 Sep 2022 19:31:19 +0200 Subject: [PATCH 1/2] ci(pre-commit): Bump self test v2.32.2 --> v2.32.3 The version of the Commitizen pre-commit hooks is typically bumped automatically by Commitizen itself, but because the behavior of cz bump was changed in Commitizen v2.32.3, and the bump from v2.32.2 to v2.32.3 was performed by Commitizen v2.32.2, the pre-commit hooks were not bumped. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f67e9f863..2e0127205 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: no-commit-to-branch - repo: https://github.com/commitizen-tools/commitizen - rev: v2.32.2 # automatically updated by Commitizen + rev: v2.32.3 # automatically updated by Commitizen hooks: - id: commitizen - id: commitizen-branch From f9fd20136dcb030f259a7722bb1a1a16ba0a7312 Mon Sep 17 00:00:00 2001 From: Kurt von Laven Date: Wed, 7 Sep 2022 23:59:54 +0200 Subject: [PATCH 2/2] refactor(bump): Remove a redundant join call The list of lines is now joined unconditionally in _bump_with_regex, so there is never a need to join it in update_version_in_files. The removed join was hence a no-op because it was performed on a str. --- commitizen/bump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commitizen/bump.py b/commitizen/bump.py index 0c821ce2d..90d2c661f 100644 --- a/commitizen/bump.py +++ b/commitizen/bump.py @@ -158,7 +158,7 @@ def update_version_in_files( # Write the file out again with smart_open(filepath, "w") as file: - file.write("".join(version_file)) + file.write(version_file) def _bump_with_regex(