Skip to content

Commit 7e972b9

Browse files
committed
Add type to symbolicreference.dereference_recursive()
1 parent 6b0faba commit 7e972b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git/refs/symbolic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ def dereference_recursive(cls, repo: 'Repo', ref_path: PathLike) -> str:
148148
# END recursive dereferencing
149149

150150
@classmethod
151-
def _get_ref_info_helper(cls, repo, ref_path):
151+
def _get_ref_info_helper(cls, repo: 'Repo', ref_path: PathLike) -> Union[Tuple[str, None], Tuple[None, str]]:
152152
"""Return: (str(sha), str(target_ref_path)) if available, the sha the file at
153153
rela_path points to, or None. target_ref_path is the reference we
154154
point to, or None"""
155-
tokens = None
155+
tokens: Union[None, List[str], Tuple[str, str]] = None
156156
repodir = _git_dir(repo, ref_path)
157157
try:
158158
with open(os.path.join(repodir, ref_path), 'rt', encoding='UTF-8') as fp:

0 commit comments

Comments
 (0)