Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit35f7e94

Browse files
SjordByron
authored andcommitted
Extend IterableList[PushInfo] instead of IterableList
1 parente67e458 commit35f7e94

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

‎git/remote.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,6 @@ def to_progress_instance(progress: Union[Callable[..., Any], RemoteProgress, Non
116116
returnprogress
117117

118118

119-
classPushInfoList(IterableList):
120-
def__new__(cls)->'PushInfoList':
121-
base=super().__new__(cls,'push_infos')
122-
returncast(PushInfoList,base)
123-
124-
def__init__(self)->None:
125-
super().__init__('push_infos')
126-
self.error:Optional[Exception]=None
127-
128-
defraise_if_error(self)->None:
129-
"""
130-
Raise an exception if any ref failed to push.
131-
"""
132-
ifself.error:
133-
raiseself.error
134-
135-
136119
classPushInfo(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
raiseNotImplementedError
253236

254237

238+
classPushInfoList(IterableList[PushInfo]):
239+
def__new__(cls)->'PushInfoList':
240+
returncast(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+
defraise_if_error(self)->None:
247+
"""
248+
Raise an exception if any ref failed to push.
249+
"""
250+
ifself.error:
251+
raiseself.error
252+
253+
255254
classFetchInfo(IterableObj,object):
256255

257256
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp