diff options
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 |