From 2fd9f6ee5c8b4ae4e01a40dc398e2768d838210d Mon Sep 17 00:00:00 2001 From: yobmod Date: Tue, 2 Mar 2021 21:46:17 +0000 Subject: add types to git.compat and git.diff --- git/db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git/db.py') diff --git a/git/db.py b/git/db.py index e2d3910d..ef2b0b2e 100644 --- a/git/db.py +++ b/git/db.py @@ -1,4 +1,5 @@ """Module with our own gitdb implementation - it uses the git command""" +from typing import AnyStr from git.util import bin_to_hex, hex_to_bin from gitdb.base import ( OInfo, @@ -13,7 +14,7 @@ from .exc import GitCommandError # typing------------------------------------------------- from .cmd import Git -from .types import PathLike, TBD +from .types import PathLike # -------------------------------------------------------- @@ -48,7 +49,7 @@ class GitCmdObjectDB(LooseObjectDB): # { Interface - def partial_to_complete_sha_hex(self, partial_hexsha: str) -> bytes: + def partial_to_complete_sha_hex(self, partial_hexsha: AnyStr) -> bytes: """:return: Full binary 20 byte sha from the given partial hexsha :raise AmbiguousObjectName: :raise BadObject: -- cgit v1.2.1