36
36
37
37
# typing-------------------------------------------------------
38
38
39
- from typing import Any , Callable , Dict , Iterator , Optional , TYPE_CHECKING , Union , cast , overload
39
+ from typing import Any , Callable , Dict , Iterator , List , Optional , TYPE_CHECKING , Union , cast , overload
40
40
41
- from git .types import PathLike , Literal
41
+ from git .types import PathLike , Literal , TBD
42
42
43
43
if TYPE_CHECKING :
44
44
from git .repo .base import Repo
@@ -666,7 +666,7 @@ def rename(self, new_name: str) -> 'Remote':
666
666
667
667
return self
668
668
669
- def update (self , ** kwargs ) :
669
+ def update (self , ** kwargs : Any ) -> 'Remote' :
670
670
"""Fetch all changes for this remote, including new branches which will
671
671
be forced in ( in case your local remote branch is not part the new remote branches
672
672
ancestry anymore ).
@@ -680,7 +680,8 @@ def update(self, **kwargs):
680
680
self .repo .git .remote (scmd , self .name , ** kwargs )
681
681
return self
682
682
683
- def _get_fetch_info_from_stderr (self , proc , progress ):
683
+ def _get_fetch_info_from_stderr (self , proc : TBD ,
684
+ progress : Union [Callable [..., Any ], RemoteProgress , None ]) -> IterableList :
684
685
progress = to_progress_instance (progress )
685
686
686
687
# skip first line as it is some remote info we are not interested in
@@ -739,7 +740,8 @@ def _get_fetch_info_from_stderr(self, proc, progress):
739
740
log .warning ("Git informed while fetching: %s" , err_line .strip ())
740
741
return output
741
742
742
- def _get_push_info (self , proc , progress ):
743
+ def _get_push_info (self , proc : TBD ,
744
+ progress : Union [Callable [..., Any ], RemoteProgress , None ]) -> List [PushInfo ]:
743
745
progress = to_progress_instance (progress )
744
746
745
747
# read progress information from stderr
@@ -749,7 +751,7 @@ def _get_push_info(self, proc, progress):
749
751
progress_handler = progress .new_message_handler ()
750
752
output = []
751
753
752
- def stdout_handler (line ) :
754
+ def stdout_handler (line : str ) -> None :
753
755
try :
754
756
output .append (PushInfo ._from_line (self , line ))
755
757
except ValueError :
0 commit comments