@@ -102,7 +102,7 @@ def test_bump_minor_increment_annotated_config_file(
102102):
103103 tmp_commitizen_cfg_file = tmp_commitizen_project .join ("pyproject.toml" )
104104 tmp_commitizen_cfg_file .write (
105- f"{ tmp_commitizen_cfg_file .read ()} \n " f"annotated_tag = 1"
105+ f"{ tmp_commitizen_cfg_file .read ()} \n annotated_tag = 1"
106106 )
107107 create_file_and_commit (commit_msg )
108108 testargs = ["cz" , "bump" , "--yes" ]
@@ -121,7 +121,7 @@ def test_bump_minor_increment_signed_config_file(
121121 commit_msg , mocker : MockFixture , tmp_commitizen_project_with_gpg
122122):
123123 tmp_commitizen_cfg_file = tmp_commitizen_project_with_gpg .join ("pyproject.toml" )
124- tmp_commitizen_cfg_file .write (f"{ tmp_commitizen_cfg_file .read ()} \n " f"gpg_sign = 1" )
124+ tmp_commitizen_cfg_file .write (f"{ tmp_commitizen_cfg_file .read ()} \n gpg_sign = 1" )
125125 create_file_and_commit (commit_msg )
126126 testargs = ["cz" , "bump" , "--yes" ]
127127 mocker .patch .object (sys , "argv" , testargs )
@@ -383,7 +383,7 @@ def test_bump_on_git_with_hooks_no_verify_disabled(mocker: MockFixture):
383383 """Bump commit without --no-verify"""
384384 cmd .run ("mkdir .git/hooks" )
385385 with open (".git/hooks/pre-commit" , "w" , encoding = "utf-8" ) as f :
386- f .write (" #!/usr/bin/env bash\n " 'echo "0.1.0"' )
386+ f .write (' #!/usr/bin/env bash\n echo "0.1.0"' )
387387 cmd .run ("chmod +x .git/hooks/pre-commit" )
388388
389389 # MINOR
@@ -402,7 +402,7 @@ def test_bump_on_git_with_hooks_no_verify_disabled(mocker: MockFixture):
402402def test_bump_tag_exists_raises_exception (mocker : MockFixture ):
403403 cmd .run ("mkdir .git/hooks" )
404404 with open (".git/hooks/post-commit" , "w" , encoding = "utf-8" ) as f :
405- f .write ("#!/usr/bin/env bash\n " "exit 9" )
405+ f .write ("#!/usr/bin/env bash\n exit 9" )
406406 cmd .run ("chmod +x .git/hooks/post-commit" )
407407
408408 # MINOR
@@ -421,7 +421,7 @@ def test_bump_tag_exists_raises_exception(mocker: MockFixture):
421421def test_bump_on_git_with_hooks_no_verify_enabled (mocker : MockFixture ):
422422 cmd .run ("mkdir .git/hooks" )
423423 with open (".git/hooks/pre-commit" , "w" , encoding = "utf-8" ) as f :
424- f .write (" #!/usr/bin/env bash\n " 'echo "0.1.0"' )
424+ f .write (' #!/usr/bin/env bash\n echo "0.1.0"' )
425425 cmd .run ("chmod +x .git/hooks/pre-commit" )
426426
427427 # MINOR
@@ -478,7 +478,7 @@ def test_bump_when_no_new_commit(mocker: MockFixture):
478478 with pytest .raises (NoCommitsFoundError ) as excinfo :
479479 cli .main ()
480480
481- expected_error_message = "[NO_COMMITS_FOUND]\n " "No new commits found."
481+ expected_error_message = "[NO_COMMITS_FOUND]\n No new commits found."
482482 assert expected_error_message in str (excinfo .value )
483483
484484
@@ -710,7 +710,7 @@ def test_prevent_prerelease_when_no_increment_detected(mocker: MockFixture, caps
710710 cli .main ()
711711
712712 expected_error_message = (
713- "[NO_COMMITS_FOUND]\n " "No commits found to generate a pre-release."
713+ "[NO_COMMITS_FOUND]\n No commits found to generate a pre-release."
714714 )
715715 assert expected_error_message in str (excinfo .value )
716716
@@ -862,7 +862,7 @@ def test_bump_changelog_command_commits_untracked_changelog_and_version_files(
862862 mode = "a" ,
863863 encoding = "utf-8" ,
864864 ) as commitizen_config :
865- commitizen_config .write (f"version_files = [\n " f" '{ version_regex } '\n ]" )
865+ commitizen_config .write (f"version_files = [\n '{ version_regex } '\n ]" )
866866
867867 with tmp_commitizen_project .join (version_filepath ).open (
868868 mode = "a+" , encoding = "utf-8"
@@ -917,7 +917,7 @@ def test_bump_invalid_manual_version_raises_exception(mocker, manual_version):
917917 cli .main ()
918918
919919 expected_error_message = (
920- "[INVALID_MANUAL_VERSION]\n " f"Invalid manual version: '{ manual_version } '"
920+ f "[INVALID_MANUAL_VERSION]\n Invalid manual version: '{ manual_version } '"
921921 )
922922 assert expected_error_message in str (excinfo .value )
923923
@@ -1425,7 +1425,7 @@ def test_bump_changelog_contains_increment_only(mocker, tmp_commitizen_project,
14251425 project_root = Path (tmp_commitizen_project )
14261426 tmp_commitizen_cfg_file = project_root / "pyproject.toml"
14271427 tmp_commitizen_cfg_file .write_text (
1428- " [tool.commitizen]\n " 'version ="1.0.0"\n ' "update_changelog_on_bump = true\n "
1428+ ' [tool.commitizen]\n version ="1.0.0"\n update_changelog_on_bump = true\n '
14291429 )
14301430 tmp_changelog_file = project_root / "CHANGELOG.md"
14311431 tmp_changelog_file .write_text ("## v1.0.0" )
0 commit comments