summaryrefslogtreecommitdiff
path: root/git/objects
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-28 21:50:49 +0100
committerYobmod <yobmod@gmail.com>2021-07-28 21:50:49 +0100
commitadc00dd1773ee1b532803b2272cc989f11e09f8a (patch)
tree72bd977e1313e09bb7e4957ec600b0a6ed076694 /git/objects
parent070f5c0d1f06d3e15ec5aa841b96fa2a1fdb7bf4 (diff)
downloadgitpython-adc00dd1773ee1b532803b2272cc989f11e09f8a.tar.gz
Fix more missing types in Symbolic.py, cos GuthubActions pytest stuck
Diffstat (limited to 'git/objects')
-rw-r--r--git/objects/commit.py1
-rw-r--r--git/objects/util.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index 884f6522..9d709656 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -128,6 +128,7 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
as what time.altzone returns. The sign is inverted compared to git's
UTC timezone."""
super(Commit, self).__init__(repo, binsha)
+ self.binsha = binsha
if tree is not None:
assert isinstance(tree, Tree), "Tree needs to be a Tree instance, was %s" % type(tree)
if tree is not None:
diff --git a/git/objects/util.py b/git/objects/util.py
index ef1ae77b..db7807c2 100644
--- a/git/objects/util.py
+++ b/git/objects/util.py
@@ -493,6 +493,11 @@ class TraversableIterableObj(IterableObj, Traversable):
return super(TraversableIterableObj, self)._list_traverse(* args, **kwargs)
@ overload # type: ignore
+ def traverse(self: T_TIobj
+ ) -> Iterator[T_TIobj]:
+ ...
+
+ @ overload
def traverse(self: T_TIobj,
predicate: Callable[[Union[T_TIobj, Tuple[Union[T_TIobj, None], T_TIobj]], int], bool],
prune: Callable[[Union[T_TIobj, Tuple[Union[T_TIobj, None], T_TIobj]], int], bool],