diff options
author | lovetox <philipp@hoerist.com> | 2022-01-25 01:33:30 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-01-25 01:33:30 +0300 |
commit | b3010f9118066b4d5b88d49fbb327ebad94726f1 (patch) | |
tree | f6e88264f80f82e6f878fe3fa84b24619b2e0cde | |
parent | 5a804eafa16f45ff343db064845f9a12b19af43d (diff) |
Add type annotations
-rw-r--r-- | nbxmpp/protocol.py | 2 | ||||
-rw-r--r-- | nbxmpp/task.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py index 4d73135..15a9bbd 100644 --- a/nbxmpp/protocol.py +++ b/nbxmpp/protocol.py @@ -936,7 +936,7 @@ class Protocol(Node): """ self.setAttr('id', val) - def getError(self): + def getError(self) -> Optional[str]: """ Return the error-condition (if present) or the textual description of the error (otherwise) diff --git a/nbxmpp/task.py b/nbxmpp/task.py index 56ef0e2..252a477 100644 --- a/nbxmpp/task.py +++ b/nbxmpp/task.py @@ -267,7 +267,7 @@ class Task: return self._error return self._result - def finish(self): + def finish(self) -> Any: if self._error is not None: raise self._error # pylint: disable=raising-bad-type return self._result |