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

Commit5bce9b4

Browse files
skinitimskiByron
authored andcommitted
Document PushInfoList
1 parent787359d commit5bce9b4

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

‎git/remote.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ def iter_items(cls, repo: "Repo", *args: Any, **kwargs: Any) -> NoReturn: # ->
278278

279279

280280
classPushInfoList(IterableList[PushInfo]):
281+
"""
282+
IterableList of PushInfo objects.
283+
"""
284+
281285
def__new__(cls)->"PushInfoList":
282286
returncast(PushInfoList,IterableList.__new__(cls,"push_infos"))
283287

@@ -1004,7 +1008,7 @@ def push(
10041008
progress:Union[RemoteProgress,"UpdateProgress",Callable[...,RemoteProgress],None]=None,
10051009
kill_after_timeout:Union[None,float]=None,
10061010
**kwargs:Any,
1007-
)->IterableList[PushInfo]:
1011+
)->PushInfoList:
10081012
"""Push changes from source branch in refspec to target branch in refspec.
10091013
10101014
:param refspec: see 'fetch' method
@@ -1025,13 +1029,13 @@ def push(
10251029
should be killed. It is set to None by default.
10261030
:param kwargs: Additional arguments to be passed to git-push
10271031
:return:
1028-
list(PushInfo, ...) list of PushInfo instances, each
1029-
one informing about an individual head which had been updated on the remote
1030-
side.
1032+
A ``PushInfoList`` object, where each list member
1033+
represents an individual head which had been updated on the remote side.
10311034
If the push contains rejected heads, these will have the PushInfo.ERROR bit set
10321035
in their flags.
1033-
If the operation fails completely, the length of the returned IterableList will
1034-
be 0."""
1036+
If the operation fails completely, the length of the returned PushInfoList will
1037+
be 0.
1038+
Call ``.raise_if_error()`` on the returned object to raise on any failure."""
10351039
kwargs=add_progress(kwargs,self.repo.git,progress)
10361040
proc=self.repo.git.push(
10371041
"--",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp