summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-24 23:35:06 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-24 23:35:06 +0100
commit4bb81228ae806f3010c50890b6343514094d3da5 (patch)
tree1f43055eacca8d510a58632a2453543eba5e1020
parent60a7a5b8df7358e5c1f7ac99d432c6b0ce2e7be6 (diff)
downloadslixmpp-4bb81228ae806f3010c50890b6343514094d3da5.tar.gz
slixmpp-4bb81228ae806f3010c50890b6343514094d3da5.tar.bz2
slixmpp-4bb81228ae806f3010c50890b6343514094d3da5.tar.xz
slixmpp-4bb81228ae806f3010c50890b6343514094d3da5.zip
xmlstream.disconnect: typing hints
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--slixmpp/xmlstream/xmlstream.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index 17d23ff2..ba58b8bd 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -12,6 +12,8 @@
:license: MIT, see LICENSE for more details
"""
+from typing import Optional
+
import functools
import logging
import socket as Socket
@@ -463,7 +465,7 @@ class XMLStream(asyncio.BaseProtocol):
self._current_connection_attempt.cancel()
self._current_connection_attempt = None
- def disconnect(self, wait=2.0, reason=None):
+ def disconnect(self, wait: float = 2.0, reason: Optional[str] = None) -> None:
"""Close the XML stream and wait for an acknowldgement from the server for
at most `wait` seconds. After the given number of seconds has
passed without a response from the serveur, or when the server