mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Apply isort to all python files (bfxapi/**/*.py).
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
from typing import \
|
||||
List, Dict, Any, \
|
||||
Optional, cast
|
||||
|
||||
import asyncio, json, uuid
|
||||
import asyncio
|
||||
import json
|
||||
import uuid
|
||||
from typing import Any, Dict, List, Optional, cast
|
||||
|
||||
import websockets.client
|
||||
|
||||
from pyee import EventEmitter
|
||||
|
||||
from bfxapi._utils.json_decoder import JSONDecoder
|
||||
from bfxapi.websocket._connection import Connection
|
||||
from bfxapi.websocket._handlers import PublicChannelsHandler
|
||||
|
||||
from bfxapi.websocket.subscriptions import Subscription
|
||||
|
||||
_CHECKSUM_FLAG_VALUE = 131_072
|
||||
|
||||
@@ -1,41 +1,31 @@
|
||||
from typing import \
|
||||
TypedDict, List, Dict, \
|
||||
Optional, Any
|
||||
|
||||
from logging import Logger
|
||||
|
||||
from datetime import datetime
|
||||
from socket import gaierror
|
||||
import asyncio
|
||||
import json
|
||||
import random
|
||||
import traceback
|
||||
from asyncio import Task
|
||||
from datetime import datetime
|
||||
from logging import Logger
|
||||
from socket import gaierror
|
||||
from typing import Any, Dict, List, Optional, TypedDict
|
||||
|
||||
import \
|
||||
traceback, json, asyncio, \
|
||||
random, websockets
|
||||
|
||||
import websockets
|
||||
import websockets.client
|
||||
|
||||
from websockets.exceptions import \
|
||||
ConnectionClosedError, \
|
||||
InvalidStatusCode
|
||||
from websockets.exceptions import ConnectionClosedError, InvalidStatusCode
|
||||
|
||||
from bfxapi._utils.json_encoder import JSONEncoder
|
||||
|
||||
from bfxapi.exceptions import InvalidCredentialError
|
||||
from bfxapi.websocket._connection import Connection
|
||||
from bfxapi.websocket._handlers import AuthEventsHandler
|
||||
from bfxapi.websocket._event_emitter import BfxEventEmitter
|
||||
|
||||
from bfxapi.exceptions import \
|
||||
InvalidCredentialError
|
||||
|
||||
from bfxapi.websocket.exceptions import \
|
||||
ReconnectionTimeoutError, \
|
||||
VersionMismatchError, \
|
||||
UnknownChannelError, \
|
||||
UnknownSubscriptionError, \
|
||||
SubIdError
|
||||
from bfxapi.websocket._handlers import AuthEventsHandler
|
||||
from bfxapi.websocket.exceptions import (
|
||||
ReconnectionTimeoutError,
|
||||
SubIdError,
|
||||
UnknownChannelError,
|
||||
UnknownSubscriptionError,
|
||||
VersionMismatchError,
|
||||
)
|
||||
|
||||
from .bfx_websocket_bucket import BfxWebSocketBucket
|
||||
|
||||
from .bfx_websocket_inputs import BfxWebSocketInputs
|
||||
|
||||
_Credentials = TypedDict("_Credentials", \
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
from typing import \
|
||||
Callable, Awaitable, Tuple, \
|
||||
List, Union, Optional, \
|
||||
Any
|
||||
|
||||
from decimal import Decimal
|
||||
from typing import Any, Awaitable, Callable, List, Optional, Tuple, Union
|
||||
|
||||
_Handler = Callable[[str, Any], Awaitable[None]]
|
||||
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
from typing import \
|
||||
TypeVar, Callable, Awaitable, \
|
||||
List, Dict, Optional, \
|
||||
Any, cast
|
||||
import hashlib
|
||||
import hmac
|
||||
import json
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
from typing import Any, Awaitable, Callable, Dict, List, Optional, TypeVar, cast
|
||||
|
||||
# pylint: disable-next=wrong-import-order
|
||||
from typing_extensions import \
|
||||
ParamSpec, Concatenate
|
||||
|
||||
from abc import \
|
||||
ABC, abstractmethod
|
||||
|
||||
from functools import wraps
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
import hmac, hashlib, json
|
||||
|
||||
from typing_extensions import Concatenate, ParamSpec
|
||||
from websockets.client import WebSocketClientProtocol
|
||||
|
||||
from bfxapi.websocket.exceptions import \
|
||||
ConnectionNotOpen, ActionRequiresAuthentication
|
||||
from bfxapi.websocket.exceptions import ActionRequiresAuthentication, ConnectionNotOpen
|
||||
|
||||
_S = TypeVar("_S", bound="Connection")
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
from typing import \
|
||||
TypeVar, Callable, List, \
|
||||
Dict, Union, Optional, \
|
||||
Any
|
||||
|
||||
from collections import defaultdict
|
||||
from asyncio import AbstractEventLoop
|
||||
from collections import defaultdict
|
||||
from typing import Any, Callable, Dict, List, Optional, TypeVar, Union
|
||||
|
||||
from pyee.asyncio import AsyncIOEventEmitter
|
||||
|
||||
from bfxapi.websocket.exceptions import UnknownEventError
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
from .public_channels_handler import PublicChannelsHandler
|
||||
|
||||
from .auth_events_handler import AuthEventsHandler
|
||||
from .public_channels_handler import PublicChannelsHandler
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
from typing import \
|
||||
Dict, Tuple, Any
|
||||
from typing import Any, Dict, Tuple
|
||||
|
||||
from pyee.base import EventEmitter
|
||||
|
||||
from bfxapi.types import serializers
|
||||
|
||||
from bfxapi.types.dataclasses import FundingOffer, Order
|
||||
from bfxapi.types.serializers import _Notification
|
||||
|
||||
from bfxapi.types.dataclasses import \
|
||||
Order, FundingOffer
|
||||
|
||||
class AuthEventsHandler:
|
||||
__ABBREVIATIONS = {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
from typing import \
|
||||
List, Any, cast
|
||||
from typing import Any, List, cast
|
||||
|
||||
from pyee.base import EventEmitter
|
||||
|
||||
from bfxapi.types import serializers
|
||||
|
||||
from bfxapi.websocket.subscriptions import \
|
||||
Subscription, Ticker, Trades, \
|
||||
Book, Candles, Status
|
||||
from bfxapi.websocket.subscriptions import (
|
||||
Book,
|
||||
Candles,
|
||||
Status,
|
||||
Subscription,
|
||||
Ticker,
|
||||
Trades,
|
||||
)
|
||||
|
||||
_CHECKSUM = "cs"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from bfxapi.exceptions import BfxBaseException
|
||||
|
||||
|
||||
class ConnectionNotOpen(BfxBaseException):
|
||||
pass
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from typing import \
|
||||
Union, Literal, TypedDict
|
||||
from typing import Literal, TypedDict, Union
|
||||
|
||||
Subscription = Union["Ticker", "Trades", "Book", "Candles", "Status"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user