Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
python-nbxmpp
Commits
b3010f91
Commit
b3010f91
authored
Jan 24, 2022
by
Philipp Hörist
Browse files
Add type annotations
parent
5a804eaf
Pipeline
#9146
failed with stages
in 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nbxmpp/protocol.py
View file @
b3010f91
...
...
@@ -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)
...
...
nbxmpp/task.py
View file @
b3010f91
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment