Skip to content

Commit 8797904

Browse files
SjordByron
authored andcommitted
Fix type handing on PushInfoList
1 parent 63f4ca3 commit 8797904

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: git/remote.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ def to_progress_instance(progress: Union[Callable[..., Any], RemoteProgress, Non
117117

118118

119119
class PushInfoList(IterableList):
120-
def __new__(cls) -> 'IterableList[IterableObj]':
121-
return super(IterableList, cls).__new__(cls, 'push_infos')
120+
def __new__(cls) -> 'PushInfoList':
121+
base = super().__new__(cls, 'push_infos')
122+
return cast(PushInfoList, base)
122123

123124
def __init__(self) -> None:
124125
super().__init__('push_infos')
125126
self.error = None
126127

127-
def raise_if_error(self):
128+
def raise_if_error(self) -> None:
128129
"""
129130
Raise an exception if any ref failed to push.
130131
"""

0 commit comments

Comments
 (0)