2222)
2323from git .objects import (
2424 Blob ,
25- Submodule ,
2625 Tree ,
2726 Object ,
2827 Commit ,
7675 from git .repo import Repo
7776 from git .refs .reference import Reference
7877 from git .util import Actor
78+ from git .objects .submodule .base import Submodule
7979
8080
8181StageType = int
@@ -842,7 +842,7 @@ def _items_to_rela_paths(self, items):
842842 items = [items ]
843843
844844 for item in items :
845- if isinstance (item , (BaseIndexEntry , (Blob , Submodule ))):
845+ if isinstance (item , (BaseIndexEntry , (Blob , ' Submodule' ))):
846846 paths .append (self ._to_relative_path (item .path ))
847847 elif isinstance (item , str ):
848848 paths .append (self ._to_relative_path (item ))
@@ -853,7 +853,7 @@ def _items_to_rela_paths(self, items):
853853
854854 @post_clear_cache
855855 @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 ,
857857 ** kwargs : Any ) -> List [str ]:
858858 """Remove the given items from the index and optionally from
859859 the working tree as well.
@@ -905,7 +905,7 @@ def remove(self, items: Sequence[Union[PathLike, Blob, BaseIndexEntry, Submodule
905905
906906 @post_clear_cache
907907 @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 ,
909909 ** kwargs : Any ) -> List [Tuple [str , str ]]:
910910 """Rename/move the items, whereas the last item is considered the destination of
911911 the move operation. If the destination is a file, the first item ( of two )
0 commit comments