diff --git a/gssapi/_utils.py b/gssapi/_utils.py index 5956ac40..0ad752ec 100644 --- a/gssapi/_utils.py +++ b/gssapi/_utils.py @@ -4,6 +4,8 @@ import six import decorator as deco +from typing import Optional + from gssapi.raw.misc import GSSError @@ -43,7 +45,7 @@ def getter(self): return property(getter, setter) -def inquire_property(name, doc=None): +def inquire_property(name: str, doc: Optional[str] = None): """Creates a property based on an inquire result This method creates a property that calls the @@ -59,7 +61,7 @@ def inquire_property(name, doc=None): def inquire_property(self): if not self._started: - msg = ("Cannot read {0} from a security context whose " + msg = (f"Cannot read {name} from a security context whose " "establishment has not yet been started.") raise AttributeError(msg)