diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-19 16:57:04 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-19 16:57:04 +0100 |
commit | 6609ef7c3b5bb840dba8d0a5362e67746761a437 (patch) | |
tree | f79b38acd48927faf21a298bd690eba3b9fbacc2 /git/objects/base.py | |
parent | 29e12e9ceee59a87984c9049ac84e030a4dd0ed2 (diff) | |
download | gitpython-6609ef7c3b5bb840dba8d0a5362e67746761a437.tar.gz |
Make types in refs compatible with objects
Diffstat (limited to 'git/objects/base.py')
-rw-r--r-- | git/objects/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/base.py b/git/objects/base.py index 4e2ed493..64f105ca 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -15,9 +15,9 @@ from .util import get_object_type_by_name # typing ------------------------------------------------------------------ -from typing import Any, TYPE_CHECKING, Optional, Union +from typing import Any, TYPE_CHECKING, Union -from git.types import PathLike, Commit_ish +from git.types import PathLike, Commit_ish, Lit_commit_ish if TYPE_CHECKING: from git.repo import Repo @@ -44,7 +44,7 @@ class Object(LazyMixin): TYPES = (dbtyp.str_blob_type, dbtyp.str_tree_type, dbtyp.str_commit_type, dbtyp.str_tag_type) __slots__ = ("repo", "binsha", "size") - type = None # type: Optional[str] # to be set by subclass + type: Union[Lit_commit_ish, None] = None def __init__(self, repo: 'Repo', binsha: bytes): """Initialize an object by identifying it by its binary sha. |