summaryrefslogtreecommitdiff
path: root/git/objects/tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/tree.py')
-rw-r--r--git/objects/tree.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/git/objects/tree.py b/git/objects/tree.py
index d3681e23..804554d8 100644
--- a/git/objects/tree.py
+++ b/git/objects/tree.py
@@ -4,7 +4,7 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
-from git.util import join_path
+from git.util import IterableList, join_path
import git.diff as diff
from git.util import to_bin_sha
@@ -21,7 +21,7 @@ from .fun import (
# typing -------------------------------------------------
-from typing import (Callable, Dict, Iterable, Iterator, List,
+from typing import (Any, Callable, Dict, Iterable, Iterator, List,
Tuple, Type, Union, cast, TYPE_CHECKING)
from git.types import PathLike, TypeGuard
@@ -323,6 +323,9 @@ class Tree(IndexObject, diff.Diffable, util.Traversable, util.Serializable):
super(Tree, self).traverse(predicate, prune, depth, # type: ignore
branch_first, visit_once, ignore_self))
+ def list_traverse(self, *args: Any, **kwargs: Any) -> IterableList[Union['Tree', 'Submodule', 'Blob']]:
+ return super(Tree, self).list_traverse(* args, **kwargs)
+
# List protocol
def __getslice__(self, i: int, j: int) -> List[IndexObjUnion]: