22
22
)
23
23
from git .objects import (
24
24
Blob ,
25
- Submodule ,
26
25
Tree ,
27
26
Object ,
28
27
Commit ,
76
75
from git .repo import Repo
77
76
from git .refs .reference import Reference
78
77
from git .util import Actor
78
+ from git .objects .submodule .base import Submodule
79
79
80
80
81
81
StageType = int
@@ -842,7 +842,7 @@ def _items_to_rela_paths(self, items):
842
842
items = [items ]
843
843
844
844
for item in items :
845
- if isinstance (item , (BaseIndexEntry , (Blob , Submodule ))):
845
+ if isinstance (item , (BaseIndexEntry , (Blob , ' Submodule' ))):
846
846
paths .append (self ._to_relative_path (item .path ))
847
847
elif isinstance (item , str ):
848
848
paths .append (self ._to_relative_path (item ))
@@ -853,7 +853,7 @@ def _items_to_rela_paths(self, items):
853
853
854
854
@post_clear_cache
855
855
@default_index
856
- def remove (self , items : Sequence [Union [PathLike , Blob , BaseIndexEntry , Submodule ]], working_tree : bool = False ,
856
+ def remove (self , items : Sequence [Union [PathLike , Blob , BaseIndexEntry , ' Submodule' ]], working_tree : bool = False ,
857
857
** kwargs : Any ) -> List [str ]:
858
858
"""Remove the given items from the index and optionally from
859
859
the working tree as well.
@@ -905,7 +905,7 @@ def remove(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, Submodule
905
905
906
906
@post_clear_cache
907
907
@default_index
908
- def move (self , items : Sequence [Union [PathLike , Blob , BaseIndexEntry , Submodule ]], skip_errors : bool = False ,
908
+ def move (self , items : Sequence [Union [PathLike , Blob , BaseIndexEntry , ' Submodule' ]], skip_errors : bool = False ,
909
909
** kwargs : Any ) -> List [Tuple [str , str ]]:
910
910
"""Rename/move the items, whereas the last item is considered the destination of
911
911
the move operation. If the destination is a file, the first item ( of two )
0 commit comments