Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit da88a6d

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

1 file changed

+4-3Lines changed: 4 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/index/typ.py‎

Copy file name to clipboardExpand all lines: git/index/typ.py
+4-3Lines changed: 4 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.