diff options
author | Austin Scola <austinscola@gmail.com> | 2022-06-21 08:40:09 -0400 |
---|---|---|
committer | Austin Scola <austinscola@gmail.com> | 2022-06-21 08:40:09 -0400 |
commit | da88a6da599c8bc598abfc00c6802d08be67be39 (patch) | |
tree | 103f82479604f9a5bf5ba7e24e062d1c313e60b2 /git/index/typ.py | |
parent | f0c6e1164f390081a27de952552aa83d34035f2a (diff) | |
download | gitpython-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.py | 7 |
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 |