@@ -393,9 +393,9 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
393393 self .log .debug ("No git revision set, defaulting to origin/master" )
394394 symref = self .cmd .symbolic_ref (name = "HEAD" , short = True )
395395 git_tag = symref .rstrip () if symref else "origin/master"
396- self .log .debug ("git_tag: %s" % git_tag )
396+ self .log .debug (f "git_tag: { git_tag } " )
397397
398- self .log .info ("Updating to '%s '." % git_tag )
398+ self .log .info (f "Updating to '{ git_tag } '." )
399399
400400 # Get head sha
401401 try :
@@ -408,14 +408,14 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
408408 self .log .exception ("Failed to get the hash for HEAD" )
409409 return
410410
411- self .log .debug ("head_sha: %s" % head_sha )
411+ self .log .debug (f "head_sha: { head_sha } " )
412412
413413 # If a remote ref is asked for, which can possibly move around,
414414 # we must always do a fetch and checkout.
415415 show_ref_output = self .cmd .show_ref (pattern = git_tag , check_returncode = False )
416- self .log .debug ("show_ref_output: %s" % show_ref_output )
416+ self .log .debug (f "show_ref_output: { show_ref_output } " )
417417 is_remote_ref = "remotes" in show_ref_output
418- self .log .debug ("is_remote_ref: %s" % is_remote_ref )
418+ self .log .debug (f "is_remote_ref: { is_remote_ref } " )
419419
420420 # show-ref output is in the form "<sha> refs/remotes/<remote>/<tag>"
421421 # we must strip the remote from the tag.
@@ -433,8 +433,8 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
433433 raise GitRemoteRefNotFound (git_tag = git_tag , ref_output = show_ref_output )
434434 git_remote_name = m .group ("git_remote_name" )
435435 git_tag = m .group ("git_tag" )
436- self .log .debug ("git_remote_name: %s" % git_remote_name )
437- self .log .debug ("git_tag: %s" % git_tag )
436+ self .log .debug (f "git_remote_name: { git_remote_name } " )
437+ self .log .debug (f "git_tag: { git_tag } " )
438438
439439 # This will fail if the tag does not exist (it probably has not
440440 # been fetched yet).
@@ -448,7 +448,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
448448 except exc .CommandError as e :
449449 error_code = e .returncode if e .returncode is not None else 0
450450 tag_sha = ""
451- self .log .debug ("tag_sha: %s" % tag_sha )
451+ self .log .debug (f "tag_sha: { tag_sha } " )
452452
453453 # Is the hash checkout out what we want?
454454 somethings_up = (error_code , is_remote_ref , tag_sha != head_sha )
@@ -459,7 +459,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
459459 try :
460460 process = self .cmd .fetch (log_in_real_time = True , check_returncode = True )
461461 except exc .CommandError :
462- self .log .exception ("Failed to fetch repository '%s'" % url )
462+ self .log .exception (f "Failed to fetch repository '{ url } '" )
463463 return
464464
465465 if is_remote_ref :
@@ -485,7 +485,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
485485 try :
486486 process = self .cmd .checkout (branch = git_tag )
487487 except exc .CommandError :
488- self .log .exception ("Failed to checkout tag: '%s'" % git_tag )
488+ self .log .exception (f "Failed to checkout tag: '{ git_tag } '" )
489489 return
490490
491491 # Rebase changes from the remote branch
@@ -501,8 +501,8 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
501501 self .cmd .stash .pop (index = True , quiet = True )
502502
503503 self .log .exception (
504- "\n Failed to rebase in: '%s '.\n "
505- "You will have to resolve the conflicts manually" % self . path ,
504+ f "\n Failed to rebase in: '{ self . path } '.\n "
505+ "You will have to resolve the conflicts manually" ,
506506 )
507507 return
508508
0 commit comments