summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Langkemper <sjoerd-github@linuxonly.nl>2021-11-09 12:17:02 +0000
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-11-13 15:20:20 +0800
commit8797904d04abc2df5da93ca7d799da21e5a50cb5 (patch)
tree8b4d16aebd6599300b4870115064839173cd4400
parent63f4ca304bddf019220912b7b8e2abe585d88fe0 (diff)
downloadgitpython-8797904d04abc2df5da93ca7d799da21e5a50cb5.tar.gz
Fix type handing on PushInfoList
-rw-r--r--git/remote.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/git/remote.py b/git/remote.py
index 74543676..aae845e5 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -117,14 +117,15 @@ def to_progress_instance(progress: Union[Callable[..., Any], RemoteProgress, Non
class PushInfoList(IterableList):
- def __new__(cls) -> 'IterableList[IterableObj]':
- return super(IterableList, cls).__new__(cls, 'push_infos')
+ def __new__(cls) -> 'PushInfoList':
+ base = super().__new__(cls, 'push_infos')
+ return cast(PushInfoList, base)
def __init__(self) -> None:
super().__init__('push_infos')
self.error = None
- def raise_if_error(self):
+ def raise_if_error(self) -> None:
"""
Raise an exception if any ref failed to push.
"""