From da88a6da599c8bc598abfc00c6802d08be67be39 Mon Sep 17 00:00:00 2001 From: Austin Scola Date: Tue, 21 Jun 2022 08:40:09 -0400 Subject: Fix blob filter types Fix the types and type annotations of some of the blob filter code. --- git/index/typ.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'git/index/typ.py') 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 -- cgit v1.2.1