@@ -549,10 +549,10 @@ def delete_url(self, url: str, **kwargs: Any) -> 'Remote':
549549 return self .set_url (url , delete = True )
550550
551551 @property
552- def urls (self ):
552+ def urls (self ) -> Iterator [ str ] :
553553 """:return: Iterator yielding all configured URL targets on a remote as strings"""
554554 try :
555- # can replace cast with type assert?
555+ # can replace cast with type assert?
556556 remote_details = cast (str , self .repo .git .remote ("get-url" , "--all" , self .name ))
557557 for line in remote_details .split ('\n ' ):
558558 yield line
@@ -568,19 +568,19 @@ def urls(self):
568568 for line in remote_details .split ('\n ' ):
569569 if ' Push URL:' in line :
570570 yield line .split (': ' )[- 1 ]
571- except GitCommandError as ex :
572- if any (msg in str (ex ) for msg in ['correct access rights' , 'cannot run ssh' ]):
571+ except GitCommandError as _ex :
572+ if any (msg in str (_ex ) for msg in ['correct access rights' , 'cannot run ssh' ]):
573573 # If ssh is not setup to access this repository, see issue 694
574574 remote_details = cast (str , self .repo .git .config ('--get-all' , 'remote.%s.url' % self .name ))
575575 for line in remote_details .split ('\n ' ):
576576 yield line
577577 else :
578- raise ex
578+ raise _ex
579579 else :
580580 raise ex
581581
582582 @property
583- def refs (self ):
583+ def refs (self ) -> IterableList :
584584 """
585585 :return:
586586 IterableList of RemoteReference objects. It is prefixed, allowing
@@ -591,7 +591,7 @@ def refs(self):
591591 return out_refs
592592
593593 @property
594- def stale_refs (self ):
594+ def stale_refs (self ) -> IterableList :
595595 """
596596 :return:
597597 IterableList RemoteReference objects that do not have a corresponding
0 commit comments