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

Commitc08f592

Browse files
committed
add types to PushInfo.__init__() .remote_ref() and .old_commit()
1 parenta1fa850 commitc08f592

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/remote.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ class PushInfo(object):
115115
'=':UP_TO_DATE,
116116
'!':ERROR}
117117

118-
def__init__(self,flags,local_ref,remote_ref_string,remote,old_commit=None,
119-
summary=''):
118+
def__init__(self,flags:Set[int],local_ref:SymbolicReference,remote_ref_string:str,remote,
119+
old_commit:Optional[bytes]=None,summary:str='')->None:
120120
""" Initialize a new instance """
121121
self.flags=flags
122122
self.local_ref=local_ref
@@ -126,11 +126,11 @@ def __init__(self, flags, local_ref, remote_ref_string, remote, old_commit=None,
126126
self.summary=summary
127127

128128
@property
129-
defold_commit(self):
129+
defold_commit(self)->Optional[bool]:
130130
returnself._old_commit_shaandself._remote.repo.commit(self._old_commit_sha)orNone
131131

132132
@property
133-
defremote_ref(self):
133+
defremote_ref(self)->Union[RemoteReference,TagReference]:
134134
"""
135135
:return:
136136
Remote Reference or TagReference in the local repository corresponding

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp