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

Commitfe42ca7

Browse files
committed
Help tools know the type of a Commit'sparents
mypy seems not to need this, and already infers the specific typeList[Commit], but some other type checkers -- at least pylance, andthus probably also pyright -- do not infer this.
1 parentd1ce940 commitfe42ca7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎git/objects/commit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ def _deserialize(self, stream: BytesIO) -> "Commit":
753753
readline=stream.readline
754754
self.tree=Tree(self.repo,hex_to_bin(readline().split()[1]),Tree.tree_id<<12,"")
755755

756-
self.parents= []
756+
self.parents= []# type: List[Commit]
757757
next_line=None
758758
whileTrue:
759759
parent_line=readline()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp