Install and configure pylint. Add pylint to dev-requirements.txt. Start rewriting code to follow pylint's linting rules.

This commit is contained in:
Davide Casale
2023-03-06 16:36:56 +01:00
parent 6c99d3aacf
commit a4c1418113
26 changed files with 70 additions and 57 deletions

View File

@@ -7,9 +7,9 @@ from bfxapi.enums import Error, OrderType
from bfxapi.websocket.types import Notification, Order
bfx = Client(
WSS_HOST=WSS_HOST,
API_KEY=os.getenv("BFX_API_KEY"),
API_SECRET=os.getenv("BFX_API_SECRET")
wss_host=WSS_HOST,
api_key=os.getenv("BFX_API_KEY"),
api_secret=os.getenv("BFX_API_SECRET")
)
@bfx.wss.on("wss-error")

View File

@@ -7,9 +7,9 @@ from bfxapi.enums import Error
from bfxapi.websocket.types import List, Wallet
bfx = Client(
API_KEY=os.getenv("BFX_API_KEY"),
API_SECRET=os.getenv("BFX_API_SECRET"),
filter=["wallet"]
api_key=os.getenv("BFX_API_KEY"),
api_secret=os.getenv("BFX_API_SECRET"),
filters=["wallet"]
)
@bfx.wss.on("wss-error")

View File

@@ -6,7 +6,7 @@ from bfxapi.websocket.types import DerivativesStatus
from bfxapi.websocket import subscriptions
bfx = Client(WSS_HOST=PUB_WSS_HOST)
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("derivatives_status_update")
def on_derivatives_status_update(subscription: subscriptions.Status, data: DerivativesStatus):

View File

@@ -38,7 +38,7 @@ SYMBOLS = [ "tBTCUSD", "tLTCUSD", "tLTCBTC", "tETHUSD", "tETHBTC" ]
order_book = OrderBook(symbols=SYMBOLS)
bfx = Client(WSS_HOST=PUB_WSS_HOST)
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("wss-error")
def on_wss_error(code: Error, msg: str):

View File

@@ -38,7 +38,7 @@ SYMBOLS = [ "tBTCUSD", "tLTCUSD", "tLTCBTC", "tETHUSD", "tETHBTC" ]
raw_order_book = RawOrderBook(symbols=SYMBOLS)
bfx = Client(WSS_HOST=PUB_WSS_HOST)
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("wss-error")
def on_wss_error(code: Error, msg: str):

View File

@@ -6,7 +6,7 @@ from bfxapi.websocket import subscriptions
from bfxapi.websocket.enums import Channel
from bfxapi.websocket.types import TradingPairTicker
bfx = Client(WSS_HOST=PUB_WSS_HOST)
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("t_ticker_update")
def on_t_ticker_update(subscription: subscriptions.Ticker, data: TradingPairTicker):

View File

@@ -6,7 +6,7 @@ from bfxapi.websocket.types import Candle, TradingPairTrade
from bfxapi.websocket import subscriptions
bfx = Client(WSS_HOST=PUB_WSS_HOST)
bfx = Client(wss_host=PUB_WSS_HOST)
@bfx.wss.on("candles_update")
def on_candles_update(subscription: subscriptions.Candles, candle: Candle):