diff options
author | Dominic <yobmod@gmail.com> | 2021-07-31 20:22:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-31 20:22:34 +0100 |
commit | 05825dcaaf6bf3de7d7e2bc595ad6dcb145f11e8 (patch) | |
tree | 9253532b6bb74372d2034c16ad58c6094f11fcc8 /git/objects/base.py | |
parent | 300330dfa2d2baece6d34b450523ac2a079c228b (diff) | |
parent | 2a350b57ce79a0e1b71623d1146c52918232e074 (diff) | |
download | gitpython-05825dcaaf6bf3de7d7e2bc595ad6dcb145f11e8.tar.gz |
Merge pull request #1308 from Yobmod/main
Add remaining types to symbolic.py
Diffstat (limited to 'git/objects/base.py')
-rw-r--r-- | git/objects/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git/objects/base.py b/git/objects/base.py index 64f105ca..a3b0f230 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -25,6 +25,7 @@ if TYPE_CHECKING: from .tree import Tree from .blob import Blob from .submodule.base import Submodule + from git.refs.reference import Reference IndexObjUnion = Union['Tree', 'Blob', 'Submodule'] @@ -59,7 +60,7 @@ class Object(LazyMixin): assert len(binsha) == 20, "Require 20 byte binary sha, got %r, len = %i" % (binsha, len(binsha)) @classmethod - def new(cls, repo: 'Repo', id): # @ReservedAssignment + def new(cls, repo: 'Repo', id: Union[str, 'Reference']) -> Commit_ish: """ :return: New Object instance of a type appropriate to the object type behind id. The id of the newly created object will be a binsha even though |