diff --git a/bfxapi/_utils/logger.py b/bfxapi/_utils/logging.py similarity index 100% rename from bfxapi/_utils/logger.py rename to bfxapi/_utils/logging.py diff --git a/bfxapi/client.py b/bfxapi/client.py index fe86615..dd9127c 100644 --- a/bfxapi/client.py +++ b/bfxapi/client.py @@ -1,7 +1,7 @@ from typing import \ TYPE_CHECKING, TypedDict, List, Literal, Optional -from bfxapi._utils.logger import ColorLogger +from bfxapi._utils.logging import ColorLogger from bfxapi.exceptions import IncompleteCredentialError diff --git a/bfxapi/websocket/_client/bfx_websocket_client.py b/bfxapi/websocket/_client/bfx_websocket_client.py index dd02469..85abb85 100644 --- a/bfxapi/websocket/_client/bfx_websocket_client.py +++ b/bfxapi/websocket/_client/bfx_websocket_client.py @@ -75,20 +75,20 @@ class BfxWebSocketClient(Connection, Connection.Authenticable): self.__credentials, self.__timeout, self.__logger = \ credentials, timeout, logger + self.__buckets: Dict[BfxWebSocketBucket, Optional["Task"]] = { } + + self.__reconnection: Optional[_Reconnection] = None + self.__event_emitter = BfxEventEmitter(targets = \ PublicChannelsHandler.ONCE_PER_SUBSCRIPTION + \ ["subscribed"]) - self.__handler = AuthEventsHandler(\ + self.__handler = AuthEventsHandler( \ event_emitter=self.__event_emitter) - self.__inputs = BfxWebSocketInputs(\ + self.__inputs = BfxWebSocketInputs( \ handle_websocket_input=self.__handle_websocket_input) - self.__buckets: Dict[BfxWebSocketBucket, Optional["Task"]] = { } - - self.__reconnection: Optional[_Reconnection] = None - @self.__event_emitter.on("error") def error(exception: Exception) -> None: header = f"{type(exception).__name__}: {str(exception)}"