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

Commit59a0c88

Browse files
committed
Fix IndexFile items argument type
Error before commit:path: os.PathLike = ...repo = git.Repo(path_dir)repo.index.add(path)
1 parent1e1a858 commit59a0c88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/index/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def _to_relative_path(self, path: PathLike) -> PathLike:
658658
returnos.path.relpath(path,self.repo.working_tree_dir)
659659

660660
def_preprocess_add_items(
661-
self,items:Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]]
661+
self,items:Union[PathLike,Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]]]
662662
)->Tuple[List[PathLike],List[BaseIndexEntry]]:
663663
"""Split the items into two lists of path strings and BaseEntries."""
664664
paths= []
@@ -749,7 +749,7 @@ def _entries_for_paths(
749749

750750
defadd(
751751
self,
752-
items:Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]],
752+
items:Union[PathLike,Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]]],
753753
force:bool=True,
754754
fprogress:Callable=lambda*args:None,
755755
path_rewriter:Union[Callable[...,PathLike],None]=None,
@@ -976,7 +976,7 @@ def _items_to_rela_paths(
976976
@default_index
977977
defremove(
978978
self,
979-
items:Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]],
979+
items:Union[PathLike,Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]]],
980980
working_tree:bool=False,
981981
**kwargs:Any,
982982
)->List[str]:
@@ -1036,7 +1036,7 @@ def remove(
10361036
@default_index
10371037
defmove(
10381038
self,
1039-
items:Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]],
1039+
items:Union[PathLike,Sequence[Union[PathLike,Blob,BaseIndexEntry,"Submodule"]]],
10401040
skip_errors:bool=False,
10411041
**kwargs:Any,
10421042
)->List[Tuple[str,str]]:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp