Skip to content

Commit 825f078

Browse files
committed
update-checkout: add type hints to confirm_tag_in_repo
1 parent 0d5bc9f commit 825f078

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def check_parallel_results(results, op):
7575

7676

7777
def confirm_tag_in_repo(tag, repo_name):
78+
# type: (str, str) -> str | None
7879
"""Confirm that a given tag exists in a git repository. This function
7980
assumes that the repository is already a current working directory before
8081
it's called.
@@ -84,7 +85,8 @@ def confirm_tag_in_repo(tag, repo_name):
8485
repo_name (str): name the repository for the look up, used for logging
8586
8687
Returns:
87-
str: returns `tag` argument value or `None` if the tag doesn't exist.
88+
str | None: returns `tag` argument value or `None` if the tag doesn't
89+
exist.
8890
"""
8991

9092
tag_exists = shell.capture(['git', 'ls-remote', '--tags',

0 commit comments

Comments
 (0)