| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fe42ca7 commit e66297a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -79,8 +79,8 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable): | |||
| 79 | 79 | # INVARIANTS | |
| 80 | 80 | default_encoding = "UTF-8" | |
| 81 | 81 | ||
| 82 | - # object configuration | ||
| 83 | 82 | type: Literal["commit"] = "commit" | |
| 83 | + | ||
| 84 | 84 | __slots__ = ( | |
| 85 | 85 | "tree", | |
| 86 | 86 | "author", | |
@@ -94,8 +94,11 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable): | |||
| 94 | 94 | "encoding", | |
| 95 | 95 | "gpgsig", | |
| 96 | 96 | ) | |
| 97 | + | ||
| 97 | 98 | _id_attribute_ = "hexsha" | |
| 98 | 99 | ||
| 100 | + parents: Sequence["Commit"] | ||
| 101 | + | ||
| 99 | 102 | def __init__( | |
| 100 | 103 | self, | |
| 101 | 104 | repo: "Repo", | |
@@ -753,7 +756,7 @@ def _deserialize(self, stream: BytesIO) -> "Commit": | |||
| 753 | 756 | readline = stream.readline | |
| 754 | 757 | self.tree = Tree(self.repo, hex_to_bin(readline().split()[1]), Tree.tree_id << 12, "") | |
| 755 | 758 | ||
| 756 | - self.parents = [] # type: List[Commit] | ||
| 759 | + self.parents = [] | ||
| 757 | 760 | next_line = None | |
| 758 | 761 | while True: | |
| 759 | 762 | parent_line = readline() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments