@@ -46,7 +46,8 @@ def _latest_git_version_tag_on_branches(
4646 t .Optional [git .objects .Commit ], t .Optional [git .TagReference ], t .Optional [Version ],
4747 int ]]:
4848 _LOG .log (logging .NOTSET , 'entering %i branches...' , len (commit .parents ))
49- results = []
49+ results : t .List [t .Tuple [
50+ t .Optional [git .objects .Commit ], t .Optional [git .TagReference ], Version , int ]] = []
5051 main_commit_distance = None
5152 for parent in commit .parents :
5253 try :
@@ -57,7 +58,7 @@ def _latest_git_version_tag_on_branches(
5758 if main_commit_distance is None :
5859 main_commit_distance = result [3 ]
5960 if result [2 ] is not None :
60- results .append (result )
61+ results .append (result ) # type: ignore
6162 if not results :
6263 if main_commit_distance is None :
6364 raise ValueError (f'reached max commit distance { MAX_COMMIT_DISTANCE } '
@@ -73,8 +74,9 @@ def _latest_git_version_tag_on_branches(
7374
7475
7576def _latest_git_version_tag (
76- repo : git .Repo , assume_if_none : bool = False , base_commit : git .objects .Commit = None ,
77- commit_distance : int = 0 , skip_commits : t .Set [git .objects .Commit ] = None ) -> t .Tuple [
77+ repo : git .Repo , assume_if_none : bool = False ,
78+ base_commit : t .Optional [git .objects .Commit ] = None , commit_distance : int = 0 ,
79+ skip_commits : t .Optional [t .Set [git .objects .Commit ]] = None ) -> t .Tuple [
7880 t .Optional [git .objects .Commit ], t .Optional [git .TagReference ], t .Optional [Version ], int ]:
7981 """Return (commit, tag at that commit if any, latest version, distance from the version)."""
8082 version_tags = _git_version_tags (repo )
0 commit comments