@@ -39,7 +39,7 @@ class GitStatusParsingException(exc.LibVCSException):
3939
4040 def __init__ (self , git_status_output : str , * args : object ):
4141 return super ().__init__ (
42- "Could not find match for git-status(1)" + f"Output: { git_status_output } "
42+ "Could not find match for git-status(1)" + f"Output: { git_status_output } " ,
4343 )
4444
4545
@@ -70,7 +70,7 @@ class GitRemoteRefNotFound(exc.CommandError):
7070 def __init__ (self , git_tag : str , ref_output : str , * args : object ):
7171 return super ().__init__ (
7272 f"Could not fetch remote in refs/remotes/{ git_tag } :"
73- + f"Output: { ref_output } "
73+ + f"Output: { ref_output } " ,
7474 )
7575
7676
@@ -174,8 +174,8 @@ def convert_pip_url(pip_url: str) -> VCSLocation:
174174 raise exc .LibVCSException (
175175 "Repo {} is malformatted, please use the convention {} for "
176176 "ssh / private GitHub repositories." .format (
177- pip_url , "git+https://github.com/username/repo.git"
178- )
177+ pip_url , "git+https://github.com/username/repo.git" ,
178+ ),
179179 )
180180 else :
181181 url , rev = base_convert_pip_url (pip_url )
@@ -192,7 +192,7 @@ class GitSync(BaseSync):
192192 _remotes : GitSyncRemoteDict
193193
194194 def __init__ (
195- self , * , url : str , dir : StrPath , remotes : GitRemotesArgs = None , ** kwargs : Any
195+ self , * , url : str , dir : StrPath , remotes : GitRemotesArgs = None , ** kwargs : Any ,
196196 ) -> None :
197197 """Local git repository.
198198
@@ -248,7 +248,7 @@ def __init__(
248248
249249 if remotes is None :
250250 self ._remotes : GitSyncRemoteDict = {
251- "origin" : GitRemote (name = "origin" , fetch_url = url , push_url = url )
251+ "origin" : GitRemote (name = "origin" , fetch_url = url , push_url = url ),
252252 }
253253 elif isinstance (remotes , dict ):
254254 self ._remotes = {}
@@ -265,7 +265,7 @@ def __init__(
265265 "fetch_url" : remote_url ["fetch_url" ],
266266 "push_url" : remote_url ["push_url" ],
267267 "name" : remote_name ,
268- }
268+ },
269269 )
270270 elif isinstance (remote_url , GitRemote ):
271271 self ._remotes [remote_name ] = remote_url
@@ -396,7 +396,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
396396 # Get head sha
397397 try :
398398 head_sha = self .cmd .rev_list (
399- commit = "HEAD" , max_count = 1 , check_returncode = True
399+ commit = "HEAD" , max_count = 1 , check_returncode = True ,
400400 )
401401 except exc .CommandError :
402402 self .log .exception ("Failed to get the hash for HEAD" )
@@ -496,7 +496,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
496496
497497 self .log .exception (
498498 "\n Failed to rebase in: '%s'.\n "
499- "You will have to resolve the conflicts manually" % self .dir
499+ "You will have to resolve the conflicts manually" % self .dir ,
500500 )
501501 return
502502
@@ -515,7 +515,7 @@ def update_repo(self, set_remotes: bool = False, *args: Any, **kwargs: Any) -> N
515515 self .log .exception (
516516 f"\n Failed to rebase in: '{ self .dir } '.\n "
517517 + "You will have to resolve the "
518- + "conflicts manually"
518+ + "conflicts manually" ,
519519 )
520520 return
521521
@@ -565,22 +565,22 @@ def remote(self, name: str, **kwargs: Any) -> Optional[GitRemote]:
565565 """
566566 try :
567567 ret = self .cmd .remote .show (
568- name = name , no_query_remotes = True , log_in_real_time = True
568+ name = name , no_query_remotes = True , log_in_real_time = True ,
569569 )
570570 lines = ret .split ("\n " )
571571 remote_fetch_url = lines [1 ].replace ("Fetch URL: " , "" ).strip ()
572572 remote_push_url = lines [2 ].replace ("Push URL: " , "" ).strip ()
573573 if remote_fetch_url != name and remote_push_url != name :
574574 return GitRemote (
575- name = name , fetch_url = remote_fetch_url , push_url = remote_push_url
575+ name = name , fetch_url = remote_fetch_url , push_url = remote_push_url ,
576576 )
577577 else :
578578 return None
579579 except exc .LibVCSException :
580580 return None
581581
582582 def set_remote (
583- self , name : str , url : str , push : bool = False , overwrite : bool = False
583+ self , name : str , url : str , push : bool = False , overwrite : bool = False ,
584584 ) -> GitRemote :
585585 """Set remote with name and URL like git remote add.
586586
@@ -670,7 +670,7 @@ def status(self) -> GitStatus:
670670 )
671671 """
672672 return GitStatus .from_stdout (
673- self .cmd .status (short = True , branch = True , porcelain = "2" )
673+ self .cmd .status (short = True , branch = True , porcelain = "2" ),
674674 )
675675
676676 def get_current_remote_name (self ) -> str :
0 commit comments