@@ -517,6 +517,9 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> NoReturn: # ->
517517 raise NotImplementedError
518518
519519
520+ Progress = Union [RemoteProgress , "UpdateProgress" , Callable [..., RemoteProgress ], None ]
521+
522+
520523class Remote (LazyMixin , IterableObj ):
521524 """Provides easy read and write access to a git remote.
522525
@@ -872,7 +875,7 @@ def update(self, **kwargs: Any) -> "Remote":
872875 def _get_fetch_info_from_stderr (
873876 self ,
874877 proc : "Git.AutoInterrupt" ,
875- progress : Union [ Callable [..., Any ], RemoteProgress , None ] ,
878+ progress : Progress ,
876879 kill_after_timeout : Union [None , float ] = None ,
877880 ) -> IterableList ["FetchInfo" ]:
878881 progress = to_progress_instance (progress )
@@ -1000,7 +1003,7 @@ def _assert_refspec(self) -> None:
10001003 def fetch (
10011004 self ,
10021005 refspec : Union [str , List [str ], None ] = None ,
1003- progress : Union [ RemoteProgress , None , "UpdateProgress" ] = None ,
1006+ progress : Progress = None ,
10041007 verbose : bool = True ,
10051008 kill_after_timeout : Union [None , float ] = None ,
10061009 allow_unsafe_protocols : bool = False ,
@@ -1081,7 +1084,7 @@ def fetch(
10811084 def pull (
10821085 self ,
10831086 refspec : Union [str , List [str ], None ] = None ,
1084- progress : Union [ RemoteProgress , "UpdateProgress" , None ] = None ,
1087+ progress : Progress = None ,
10851088 kill_after_timeout : Union [None , float ] = None ,
10861089 allow_unsafe_protocols : bool = False ,
10871090 allow_unsafe_options : bool = False ,
@@ -1135,7 +1138,7 @@ def pull(
11351138 def push (
11361139 self ,
11371140 refspec : Union [str , List [str ], None ] = None ,
1138- progress : Union [ RemoteProgress , "UpdateProgress" , Callable [..., RemoteProgress ], None ] = None ,
1141+ progress : Progress = None ,
11391142 kill_after_timeout : Union [None , float ] = None ,
11401143 allow_unsafe_protocols : bool = False ,
11411144 allow_unsafe_options : bool = False ,
0 commit comments