summaryrefslogtreecommitdiff
path: root/git/index/typ.py
diff options
context:
space:
mode:
authorAustin Scola <austinscola@gmail.com>2022-06-21 08:40:09 -0400
committerAustin Scola <austinscola@gmail.com>2022-06-21 08:40:09 -0400
commitda88a6da599c8bc598abfc00c6802d08be67be39 (patch)
tree103f82479604f9a5bf5ba7e24e062d1c313e60b2 /git/index/typ.py
parentf0c6e1164f390081a27de952552aa83d34035f2a (diff)
downloadgitpython-da88a6da599c8bc598abfc00c6802d08be67be39.tar.gz
Fix blob filter types
Fix the types and type annotations of some of the blob filter code.
Diffstat (limited to 'git/index/typ.py')
-rw-r--r--git/index/typ.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/git/index/typ.py b/git/index/typ.py
index 6371953b..d9040e10 100644
--- a/git/index/typ.py
+++ b/git/index/typ.py
@@ -4,6 +4,7 @@ from binascii import b2a_hex
from .util import pack, unpack
from git.objects import Blob
+from git.index.base import StageType
# typing ----------------------------------------------------------------------
@@ -48,10 +49,10 @@ class BlobFilter(object):
"""
self.paths = paths
- def __call__(self, stage_blob: Blob) -> bool:
- path = stage_blob[1].path
+ def __call__(self, stage_blob: Tuple[StageType, Blob]) -> bool:
+ path: str = str(stage_blob[1].path)
for p in self.paths:
- if path.startswith(p):
+ if path.startswith(str(p)):
return True
# END for each path in filter paths
return False