diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-06 14:06:59 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-06 14:06:59 +0100 |
commit | 3ce319f1296a5402079e9280500e96cc1d12fd04 (patch) | |
tree | c1c6f6684fa55c2509750377fcdc15e9dcb1018a /git/repo/base.py | |
parent | a9351347d704db02bd3d1103e9715ff6a999e3f9 (diff) | |
download | gitpython-3ce319f1296a5402079e9280500e96cc1d12fd04.tar.gz |
Add types to submodule.update()
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index e1b1fc76..ea86139b 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -48,6 +48,8 @@ if TYPE_CHECKING: from git.util import IterableList from git.refs.symbolic import SymbolicReference from git.objects import Tree + from git.objects.submodule.base import UpdateProgress + from git.remote import RemoteProgress # ----------------------------------------------------------- @@ -575,7 +577,7 @@ class Repo(object): return Commit.iter_items(self, rev, paths, **kwargs) def merge_base(self, *rev: TBD, **kwargs: Any - ) -> List[Union['SymbolicReference', Commit_ish, None]]: + ) -> List[Union[Commit_ish, None]]: """Find the closest common ancestor for the given revision (e.g. Commits, Tags, References, etc) :param rev: At least two revs to find the common ancestor for. @@ -588,7 +590,7 @@ class Repo(object): raise ValueError("Please specify at least two revs, got only %i" % len(rev)) # end handle input - res = [] # type: List[Union['SymbolicReference', Commit_ish, None]] + res = [] # type: List[Union[Commit_ish, None]] try: lines = self.git.merge_base(*rev, **kwargs).splitlines() # List[str] except GitCommandError as err: @@ -1014,7 +1016,8 @@ class Repo(object): @classmethod def _clone(cls, git: 'Git', url: PathLike, path: PathLike, odb_default_type: Type[GitCmdObjectDB], - progress: Optional[Callable], multi_options: Optional[List[str]] = None, **kwargs: Any + progress: Union['RemoteProgress', 'UpdateProgress', Callable[..., 'RemoteProgress'], None], + multi_options: Optional[List[str]] = None, **kwargs: Any ) -> 'Repo': odbt = kwargs.pop('odbt', odb_default_type) |