@@ -133,7 +133,8 @@ def tmp_git_repo_dir(tmpdir, cd, git_init, git_commit, git_config):
133133 try :
134134 git_init ()
135135 except subprocess .CalledProcessError :
136- version = subprocess .run (("git" , "--version" ), capture_output = True )
136+ git_version_cmd = "git" , "--version"
137+ version = subprocess .run (git_version_cmd , capture_output = True )
137138 # the output looks like "git version 2.34.1"
138139 v = version .stdout .decode ("utf-8" ).removeprefix ("git version " ).split ("." )
139140 if (int (v [0 ]), int (v [1 ])) < (2 , 28 ):
@@ -475,14 +476,12 @@ def test_find_config_not_git(tmpdir, cd):
475476
476477def test_load_full_config (tmp_git_repo_dir , git_add , git_commit ):
477478 relative_config_path = ".cherry_picker.toml"
478- tmp_git_repo_dir .join (relative_config_path ).write (
479- """\
479+ tmp_git_repo_dir .join (relative_config_path ).write ("""\
480480 team = "python"
481- repo = "core-workfolow "
481+ repo = "core-workflow "
482482 check_sha = "5f007046b5d4766f971272a0cc99f8461215c1ec"
483483 default_branch = "devel"
484- """
485- )
484+ """ )
486485 git_add (relative_config_path )
487486 git_commit ("Add config" )
488487 scm_revision = get_sha1_from ("HEAD" )
@@ -491,7 +490,7 @@ def test_load_full_config(tmp_git_repo_dir, git_add, git_commit):
491490 scm_revision + ":" + relative_config_path ,
492491 {
493492 "check_sha" : "5f007046b5d4766f971272a0cc99f8461215c1ec" ,
494- "repo" : "core-workfolow " ,
493+ "repo" : "core-workflow " ,
495494 "team" : "python" ,
496495 "fix_commit_msg" : True ,
497496 "default_branch" : "devel" ,
@@ -503,11 +502,9 @@ def test_load_full_config(tmp_git_repo_dir, git_add, git_commit):
503502
504503def test_load_partial_config (tmp_git_repo_dir , git_add , git_commit ):
505504 relative_config_path = ".cherry_picker.toml"
506- tmp_git_repo_dir .join (relative_config_path ).write (
507- """\
508- repo = "core-workfolow"
509- """
510- )
505+ tmp_git_repo_dir .join (relative_config_path ).write ("""\
506+ repo = "core-workflow"
507+ """ )
511508 git_add (relative_config_path )
512509 git_commit ("Add config" )
513510 scm_revision = get_sha1_from ("HEAD" )
@@ -516,7 +513,7 @@ def test_load_partial_config(tmp_git_repo_dir, git_add, git_commit):
516513 f"{ scm_revision } :{ relative_config_path } " ,
517514 {
518515 "check_sha" : "7f777ed95a19224294949e1b4ce56bbffcb1fe9f" ,
519- "repo" : "core-workfolow " ,
516+ "repo" : "core-workflow " ,
520517 "team" : "python" ,
521518 "fix_commit_msg" : True ,
522519 "default_branch" : "main" ,
@@ -528,14 +525,12 @@ def test_load_partial_config(tmp_git_repo_dir, git_add, git_commit):
528525
529526def test_load_config_no_head_sha (tmp_git_repo_dir , git_add , git_commit ):
530527 relative_config_path = ".cherry_picker.toml"
531- tmp_git_repo_dir .join (relative_config_path ).write (
532- """\
528+ tmp_git_repo_dir .join (relative_config_path ).write ("""\
533529 team = "python"
534- repo = "core-workfolow "
530+ repo = "core-workflow "
535531 check_sha = "5f007046b5d4766f971272a0cc99f8461215c1ec"
536532 default_branch = "devel"
537- """
538- )
533+ """ )
539534 git_add (relative_config_path )
540535 git_commit (f"Add { relative_config_path } " )
541536
@@ -546,7 +541,7 @@ def test_load_config_no_head_sha(tmp_git_repo_dir, git_add, git_commit):
546541 ":" + relative_config_path ,
547542 {
548543 "check_sha" : "5f007046b5d4766f971272a0cc99f8461215c1ec" ,
549- "repo" : "core-workfolow " ,
544+ "repo" : "core-workflow " ,
550545 "team" : "python" ,
551546 "fix_commit_msg" : True ,
552547 "default_branch" : "devel" ,
@@ -572,8 +567,7 @@ def test_normalize_long_commit_message():
572567 title == "[3.6] Fix broken `Show Source` links on documentation pages (GH-3113)"
573568 )
574569 assert (
575- body
576- == """The `Show Source` was broken because of a change made in sphinx 1.5.1
570+ body == """The `Show Source` was broken because of a change made in sphinx 1.5.1
577571In Sphinx 1.4.9, the sourcename was "index.txt".
578572In Sphinx 1.5.1+, it is now "index.rst.txt".
579573(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
@@ -596,8 +590,7 @@ def test_normalize_short_commit_message():
596590 title == "[3.6] Fix broken `Show Source` links on documentation pages (GH-3113)"
597591 )
598592 assert (
599- body
600- == """(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
593+ body == """(cherry picked from commit b9ff498793611d1c6a9b99df464812931a1e2d69)
601594
602595
603596Co-authored-by: Elmar Ritsch <35851+elritsch@users.noreply.github.com>"""
@@ -775,12 +768,10 @@ def test_paused_flow(tmp_git_repo_dir, git_add, git_commit):
775768 initial_scm_revision = get_sha1_from ("HEAD" )
776769
777770 relative_file_path = "some.toml"
778- tmp_git_repo_dir .join (relative_file_path ).write (
779- f"""\
771+ tmp_git_repo_dir .join (relative_file_path ).write (f"""\
780772 check_sha = "{ initial_scm_revision } "
781- repo = "core-workfolow"
782- """
783- )
773+ repo = "core-workflow"
774+ """ )
784775 git_add (relative_file_path )
785776 git_commit ("Add a config" )
786777 config_scm_revision = get_sha1_from ("HEAD" )
0 commit comments