Skip to content

Commit da88a6d

Browse files
committed
Fix blob filter types
Fix the types and type annotations of some of the blob filter code.
1 parent f0c6e11 commit da88a6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

git/index/typ.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from .util import pack, unpack
66
from git.objects import Blob
7+
from git.index.base import StageType
78

89

910
# typing ----------------------------------------------------------------------
@@ -48,10 +49,10 @@ def __init__(self, paths: Sequence[PathLike]) -> None:
4849
"""
4950
self.paths = paths
5051

51-
def __call__(self, stage_blob: Blob) -> bool:
52-
path = stage_blob[1].path
52+
def __call__(self, stage_blob: Tuple[StageType, Blob]) -> bool:
53+
path: str = str(stage_blob[1].path)
5354
for p in self.paths:
54-
if path.startswith(p):
55+
if path.startswith(str(p)):
5556
return True
5657
# END for each path in filter paths
5758
return False

0 commit comments

Comments
 (0)