summaryrefslogtreecommitdiff
path: root/git/db.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-16 21:21:44 +0100
committerYobmod <yobmod@gmail.com>2021-05-16 21:21:44 +0100
commit595181da70978ed44983a6c0ca4cb6d982ba0e8b (patch)
treede94a35c9bb218ff09324050500d7a0f81b230b2 /git/db.py
parentf58702b0c3a0bb58d49b995a7e5479a7b24933e4 (diff)
downloadgitpython-595181da70978ed44983a6c0ca4cb6d982ba0e8b.tar.gz
flake8 and mypy fixes
Diffstat (limited to 'git/db.py')
-rw-r--r--git/db.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/git/db.py b/git/db.py
index dc60c555..47cccda8 100644
--- a/git/db.py
+++ b/git/db.py
@@ -12,7 +12,7 @@ from git.exc import GitCommandError
# typing-------------------------------------------------
-from typing import TYPE_CHECKING, AnyStr
+from typing import TYPE_CHECKING
from git.types import PathLike
if TYPE_CHECKING:
@@ -39,18 +39,18 @@ class GitCmdObjectDB(LooseObjectDB):
super(GitCmdObjectDB, self).__init__(root_path)
self._git = git
- def info(self, sha: bytes) -> OInfo:
- hexsha, typename, size = self._git.get_object_header(bin_to_hex(sha))
+ def info(self, binsha: bytes) -> OInfo:
+ hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
return OInfo(hex_to_bin(hexsha), typename, size)
- def stream(self, sha: bytes) -> OStream:
+ def stream(self, binsha: bytes) -> OStream:
"""For now, all lookup is done by git itself"""
- hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(sha))
+ hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(binsha))
return OStream(hex_to_bin(hexsha), typename, size, stream)
# { Interface
- def partial_to_complete_sha_hex(self, partial_hexsha: AnyStr) -> bytes:
+ def partial_to_complete_sha_hex(self, partial_hexsha: str) -> bytes:
""":return: Full binary 20 byte sha from the given partial hexsha
:raise AmbiguousObjectName:
:raise BadObject: