diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-05 18:47:44 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-05 18:47:44 +0100 |
commit | c2317a768f4d6b72b9c20d4fbe455af8a0d77c36 (patch) | |
tree | f3ff3c2661680c93e36cd1ec9f4258d7e890c3bc /git/objects/submodule/root.py | |
parent | 23b5d6b434551e1df1c954ab5d2c0166f080fba8 (diff) | |
download | gitpython-c2317a768f4d6b72b9c20d4fbe455af8a0d77c36.tar.gz |
Make bytesIO forwardref
Diffstat (limited to 'git/objects/submodule/root.py')
-rw-r--r-- | git/objects/submodule/root.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py index 0af48710..c6746ad8 100644 --- a/git/objects/submodule/root.py +++ b/git/objects/submodule/root.py @@ -10,6 +10,15 @@ import git import logging +# typing ------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from git.repo import Repo + +# ---------------------------------------------------------------------------- + __all__ = ["RootModule", "RootUpdateProgress"] log = logging.getLogger('git.objects.submodule.root') @@ -42,7 +51,7 @@ class RootModule(Submodule): k_root_name = '__ROOT__' - def __init__(self, repo): + def __init__(self, repo: 'Repo'): # repo, binsha, mode=None, path=None, name = None, parent_commit=None, url=None, ref=None) super(RootModule, self).__init__( repo, @@ -55,7 +64,7 @@ class RootModule(Submodule): branch_path=git.Head.to_full_path(self.k_head_default) ) - def _clear_cache(self): + def _clear_cache(self) -> None: """May not do anything""" pass @@ -343,7 +352,7 @@ class RootModule(Submodule): return self - def module(self): + def module(self) -> 'Repo': """:return: the actual repository containing the submodules""" return self.repo #} END interface |