From 51d88d5355e2f1991134b567c8528d98be57d563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20D=C4=99bski?= Date: Thu, 25 Jul 2024 16:40:04 +0200 Subject: [PATCH] Changed timeout parameter type in _wait_till_sock_connected method --- livechat/utils/ws_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livechat/utils/ws_client.py b/livechat/utils/ws_client.py index cbf875d..e9ee82a 100644 --- a/livechat/utils/ws_client.py +++ b/livechat/utils/ws_client.py @@ -94,7 +94,8 @@ def send(self, request: dict, opcode=ABNF.OPCODE_TEXT) -> dict: logger.info(f'\nRESPONSE:\n{json.dumps(response, indent=4)}') return RtmResponse(response) - def _wait_till_sock_connected(self, timeout: float = 10) -> NoReturn: + def _wait_till_sock_connected(self, + timeout: Union[float, int] = 10) -> NoReturn: ''' Polls until `self.sock` is connected. Args: timeout (float): timeout value in seconds, default 10. '''