From 1d911a250cae6194ac51539cac757161cd321abe Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Sun, 18 Jun 2023 01:02:59 +0200 Subject: [PATCH] Rename bfxapi.websocket.client to _client and bfxapi.websocket.handlers to _handlers (according to PEP8). --- bfxapi/websocket/__init__.py | 2 +- bfxapi/websocket/{client => _client}/__init__.py | 0 bfxapi/websocket/{client => _client}/bfx_websocket_bucket.py | 2 +- bfxapi/websocket/{client => _client}/bfx_websocket_client.py | 2 +- bfxapi/websocket/{client => _client}/bfx_websocket_inputs.py | 0 bfxapi/websocket/{handlers => _handlers}/__init__.py | 0 bfxapi/websocket/{handlers => _handlers}/auth_events_handler.py | 0 .../{handlers => _handlers}/public_channels_handler.py | 0 setup.py | 2 +- 9 files changed, 4 insertions(+), 4 deletions(-) rename bfxapi/websocket/{client => _client}/__init__.py (100%) rename bfxapi/websocket/{client => _client}/bfx_websocket_bucket.py (98%) rename bfxapi/websocket/{client => _client}/bfx_websocket_client.py (99%) rename bfxapi/websocket/{client => _client}/bfx_websocket_inputs.py (100%) rename bfxapi/websocket/{handlers => _handlers}/__init__.py (100%) rename bfxapi/websocket/{handlers => _handlers}/auth_events_handler.py (100%) rename bfxapi/websocket/{handlers => _handlers}/public_channels_handler.py (100%) diff --git a/bfxapi/websocket/__init__.py b/bfxapi/websocket/__init__.py index 52e603a..f1ed659 100644 --- a/bfxapi/websocket/__init__.py +++ b/bfxapi/websocket/__init__.py @@ -1 +1 @@ -from .client import BfxWebSocketClient, BfxWebSocketBucket, BfxWebSocketInputs +from ._client import BfxWebSocketClient, BfxWebSocketBucket, BfxWebSocketInputs diff --git a/bfxapi/websocket/client/__init__.py b/bfxapi/websocket/_client/__init__.py similarity index 100% rename from bfxapi/websocket/client/__init__.py rename to bfxapi/websocket/_client/__init__.py diff --git a/bfxapi/websocket/client/bfx_websocket_bucket.py b/bfxapi/websocket/_client/bfx_websocket_bucket.py similarity index 98% rename from bfxapi/websocket/client/bfx_websocket_bucket.py rename to bfxapi/websocket/_client/bfx_websocket_bucket.py index ca8625e..2cc421b 100644 --- a/bfxapi/websocket/client/bfx_websocket_bucket.py +++ b/bfxapi/websocket/_client/bfx_websocket_bucket.py @@ -1,6 +1,6 @@ import asyncio, json, uuid, websockets -from ..handlers import PublicChannelsHandler +from .._handlers import PublicChannelsHandler from ..exceptions import ConnectionNotOpen, TooManySubscriptions diff --git a/bfxapi/websocket/client/bfx_websocket_client.py b/bfxapi/websocket/_client/bfx_websocket_client.py similarity index 99% rename from bfxapi/websocket/client/bfx_websocket_client.py rename to bfxapi/websocket/_client/bfx_websocket_client.py index 515e11b..8abb3c2 100644 --- a/bfxapi/websocket/client/bfx_websocket_client.py +++ b/bfxapi/websocket/_client/bfx_websocket_client.py @@ -9,7 +9,7 @@ from pyee.asyncio import AsyncIOEventEmitter from .bfx_websocket_bucket import require_websocket_connection, BfxWebSocketBucket from .bfx_websocket_inputs import BfxWebSocketInputs -from ..handlers import PublicChannelsHandler, AuthEventsHandler +from .._handlers import PublicChannelsHandler, AuthEventsHandler from ..exceptions import ActionRequiresAuthentication, InvalidAuthenticationCredentials, EventNotSupported, \ ZeroConnectionsError, ReconnectionTimeoutError, OutdatedClientVersion diff --git a/bfxapi/websocket/client/bfx_websocket_inputs.py b/bfxapi/websocket/_client/bfx_websocket_inputs.py similarity index 100% rename from bfxapi/websocket/client/bfx_websocket_inputs.py rename to bfxapi/websocket/_client/bfx_websocket_inputs.py diff --git a/bfxapi/websocket/handlers/__init__.py b/bfxapi/websocket/_handlers/__init__.py similarity index 100% rename from bfxapi/websocket/handlers/__init__.py rename to bfxapi/websocket/_handlers/__init__.py diff --git a/bfxapi/websocket/handlers/auth_events_handler.py b/bfxapi/websocket/_handlers/auth_events_handler.py similarity index 100% rename from bfxapi/websocket/handlers/auth_events_handler.py rename to bfxapi/websocket/_handlers/auth_events_handler.py diff --git a/bfxapi/websocket/handlers/public_channels_handler.py b/bfxapi/websocket/_handlers/public_channels_handler.py similarity index 100% rename from bfxapi/websocket/handlers/public_channels_handler.py rename to bfxapi/websocket/_handlers/public_channels_handler.py diff --git a/setup.py b/setup.py index 486db47..e884b88 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ setup( }, packages=[ "bfxapi", "bfxapi.utils", "bfxapi.types", - "bfxapi.websocket", "bfxapi.websocket.client", "bfxapi.websocket.handlers", + "bfxapi.websocket", "bfxapi.websocket._client", "bfxapi.websocket._handlers", "bfxapi.rest", "bfxapi.rest.endpoints", "bfxapi.rest.middleware", ], install_requires=[