Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitad1ae5f

Browse files
committed
Simplify logic with direct path conversion
1 parent24abf10 commitad1ae5f

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)

[8]ページ先頭

©2009-2025 Movatter.jp