summaryrefslogtreecommitdiff
path: root/git/repo/fun.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-05-18 08:29:52 +0800
committerGitHub <noreply@github.com>2021-05-18 08:29:52 +0800
commitb11bcfa3df4d0b792823930bffae126fd12673f7 (patch)
tree85dc837ef6cadec84d232f5e7110d2dfc44c3b1a /git/repo/fun.py
parent33346b25c3a4fb5ea37202d88d6a6c66379099c5 (diff)
parentc30bf3ba7548a0e996907b9a097ec322760eb43a (diff)
downloadgitpython-b11bcfa3df4d0b792823930bffae126fd12673f7.tar.gz
Merge pull request #1244 from Yobmod/main
Added types to Index submodule
Diffstat (limited to 'git/repo/fun.py')
-rw-r--r--git/repo/fun.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/repo/fun.py b/git/repo/fun.py
index 70394081..e96b62e0 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -18,7 +18,7 @@ from git.cmd import Git
# Typing ----------------------------------------------------------------------
-from typing import AnyStr, Union, Optional, cast, TYPE_CHECKING
+from typing import Union, Optional, cast, TYPE_CHECKING
from git.types import PathLike
if TYPE_CHECKING:
from .base import Repo
@@ -103,7 +103,7 @@ def find_submodule_git_dir(d: PathLike) -> Optional[PathLike]:
return None
-def short_to_long(odb: 'GitCmdObjectDB', hexsha: AnyStr) -> Optional[bytes]:
+def short_to_long(odb: 'GitCmdObjectDB', hexsha: str) -> Optional[bytes]:
""":return: long hexadecimal sha1 from the given less-than-40 byte hexsha
or None if no candidate could be found.
:param hexsha: hexsha with less than 40 byte"""