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

Appearance settings

Commit fe42ca7

Browse filesBrowse files
committed
Help tools know the type of a Commit's parents
mypy seems not to need this, and already infers the specific type List[Commit], but some other type checkers -- at least pylance, and thus probably also pyright -- do not infer this.
1 parent d1ce940 commit fe42ca7
Copy full SHA for fe42ca7

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/objects/commit.py‎

Copy file name to clipboardExpand all lines: git/objects/commit.py
+1-1Lines 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
while True:
759759
parent_line = readline()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.