Skip to content

Commit ad1ae5f

Browse files
committed
Simplify logic with direct path conversion
1 parent 24abf10 commit ad1ae5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎git/index/typ.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ def __init__(self, paths: Sequence[PathLike]) -> None:
5858

5959
def__call__(self, stage_blob: Tuple[StageType, Blob]) ->bool:
6060
blob_pathlike: PathLike=stage_blob[1].path
61-
blob_path: Path=blob_pathlikeifisinstance(blob_pathlike, Path) elsePath(blob_pathlike)
61+
blob_path=Path(blob_pathlike)
6262
forpathlikeinself.paths:
63-
path: Path=pathlikeifisinstance(pathlike, Path) elsePath(pathlike)
63+
path=Path(pathlike)
6464
# TODO: Change to use `PosixPath.is_relative_to` once Python 3.8 is no
6565
# longer supported.
6666
filter_parts=path.parts

0 commit comments

Comments
(0)