@@ -116,23 +116,6 @@ def to_progress_instance(progress: Union[Callable[..., Any], RemoteProgress, Non
116116 return progress
117117
118118
119- class PushInfoList (IterableList ):
120- def __new__ (cls ) -> 'PushInfoList' :
121- base = super ().__new__ (cls , 'push_infos' )
122- return cast (PushInfoList , base )
123-
124- def __init__ (self ) -> None :
125- super ().__init__ ('push_infos' )
126- self .error : Optional [Exception ] = None
127-
128- def raise_if_error (self ) -> None :
129- """
130- Raise an exception if any ref failed to push.
131- """
132- if self .error :
133- raise self .error
134-
135-
136119class PushInfo (IterableObj , object ):
137120 """
138121 Carries information about the result of a push operation of a single head::
@@ -252,6 +235,22 @@ def iter_items(cls, repo: 'Repo', *args: Any, **kwargs: Any
252235 raise NotImplementedError
253236
254237
238+ class PushInfoList (IterableList [PushInfo ]):
239+ def __new__ (cls ) -> 'PushInfoList' :
240+ return cast (PushInfoList , IterableList .__new__ (cls , 'push_infos' ))
241+
242+ def __init__ (self ) -> None :
243+ super ().__init__ ('push_infos' )
244+ self .error : Optional [Exception ] = None
245+
246+ def raise_if_error (self ) -> None :
247+ """
248+ Raise an exception if any ref failed to push.
249+ """
250+ if self .error :
251+ raise self .error
252+
253+
255254class FetchInfo (IterableObj , object ):
256255
257256 """
0 commit comments