summaryrefslogtreecommitdiff
path: root/git/refs/symbolic.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-31 16:28:10 +0100
committerYobmod <yobmod@gmail.com>2021-07-31 16:28:10 +0100
commit7e972b982cea094b84df27a7b0be5a4dd13b8469 (patch)
tree2d81792b72da2aa3cdc9bcd575493af32915afd5 /git/refs/symbolic.py
parent6b0faba783d8f93bdd23ef52f50619a61b0ed815 (diff)
downloadgitpython-7e972b982cea094b84df27a7b0be5a4dd13b8469.tar.gz
Add type to symbolicreference.dereference_recursive()
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r--git/refs/symbolic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 30a23e66..d712e5a2 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -148,11 +148,11 @@ class SymbolicReference(object):
# END recursive dereferencing
@classmethod
- def _get_ref_info_helper(cls, repo, ref_path):
+ def _get_ref_info_helper(cls, repo: 'Repo', ref_path: PathLike) -> Union[Tuple[str, None], Tuple[None, str]]:
"""Return: (str(sha), str(target_ref_path)) if available, the sha the file at
rela_path points to, or None. target_ref_path is the reference we
point to, or None"""
- tokens = None
+ tokens: Union[None, List[str], Tuple[str, str]] = None
repodir = _git_dir(repo, ref_path)
try:
with open(os.path.join(repodir, ref_path), 'rt', encoding='UTF-8') as fp: