| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e67e458 commit 35f7e94
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -116,23 +116,6 @@ def to_progress_instance(progress: Union[Callable[..., Any], RemoteProgress, Non | |||
| 116 | 116 | return progress | |
| 117 | 117 | ||
| 118 | 118 | ||
| 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 | - | ||
| 136 | 119 | class PushInfo(IterableObj, object): | |
| 137 | 120 | """ | |
| 138 | 121 | 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 | |||
| 252 | 235 | raise NotImplementedError | |
| 253 | 236 | ||
| 254 | 237 | ||
| 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 | + | ||
| 255 | 254 | class FetchInfo(IterableObj, object): | |
| 256 | 255 | ||
| 257 | 256 | """ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments