From 7f401fc659a7f9c84a9c88675aba498357a2916d Mon Sep 17 00:00:00 2001 From: Yobmod Date: Sat, 31 Jul 2021 17:09:54 +0100 Subject: Add type to symbolicreference.is_valid() --- git/refs/symbolic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'git/refs') diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 5d3a6a0d..65bad6e4 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -360,9 +360,9 @@ class SymbolicReference(object): # aliased reference reference = property(_get_reference, set_reference, doc="Returns the Reference we point to") - ref: Union[Commit_ish] = reference # type: ignore # Union[str, Commit_ish, SymbolicReference] + ref: Union['Reference'] = reference # type: ignore - def is_valid(self): + def is_valid(self) -> bool: """ :return: True if the reference is valid, hence it can be read and points to @@ -375,7 +375,7 @@ class SymbolicReference(object): return True @property - def is_detached(self): + def is_detached(self) -> bool: """ :return: True if we are a detached reference, hence we point to a specific commit @@ -386,7 +386,7 @@ class SymbolicReference(object): except TypeError: return True - def log(self): + def log(self) -> 'RefLog': """ :return: RefLog for this reference. Its last entry reflects the latest change applied to this reference -- cgit v1.2.1