removed config as a default arg;added comment to explain why on_error() and on_close() don't get a self

This commit is contained in:
mohamedemad4
2020-10-06 04:26:36 +02:00
parent 716a5b6b48
commit f157b0c841

View File

@@ -38,7 +38,7 @@ class TiingoWebsocketClient:
while True:pass
'''
def __init__(self,config={},endpoint=None,on_msg_cb=None):
def __init__(self,config,endpoint=None,on_msg_cb=None):
self._base_url = "wss://api.tiingo.com"
self.config=config
@@ -88,6 +88,7 @@ class TiingoWebsocketClient:
return
return on_msg_cb_local
# since methods need to be unbound in order for websocketClient these methods don't have a self as their first parameter
def on_error(ws, error):
print(error)