xmlstream.disconnect: typing hints
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
60a7a5b8df
commit
4bb81228ae
@ -12,6 +12,8 @@
|
|||||||
:license: MIT, see LICENSE for more details
|
:license: MIT, see LICENSE for more details
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import logging
|
import logging
|
||||||
import socket as Socket
|
import socket as Socket
|
||||||
@ -463,7 +465,7 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
self._current_connection_attempt.cancel()
|
self._current_connection_attempt.cancel()
|
||||||
self._current_connection_attempt = None
|
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
|
"""Close the XML stream and wait for an acknowldgement from the server for
|
||||||
at most `wait` seconds. After the given number of seconds has
|
at most `wait` seconds. After the given number of seconds has
|
||||||
passed without a response from the serveur, or when the server
|
passed without a response from the serveur, or when the server
|
||||||
|
Loading…
Reference in New Issue
Block a user