Skip to content

Commit

Permalink
fix api warning
Browse files Browse the repository at this point in the history
  • Loading branch information
51bitquant committed Jun 20, 2023
1 parent 2a04a25 commit d79cd96
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions howtrader/api/rest/rest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(
self.on_error: ON_ERROR_TYPE = on_error
self.extra: Any = extra

self.response: "Response" = None
self.response: Optional["Response"] = None

def __str__(self):
"""display in str"""
Expand Down Expand Up @@ -120,10 +120,10 @@ class RestClient(object):
def __init__(self):
""""""
self.url_base: str = ""
self.proxy: str = None
self.proxy: Optional[str] = None

self.session: ClientSession = None
self.loop: AbstractEventLoop = None
self.session: Optional[ClientSession] = None
self.loop: Optional[AbstractEventLoop] = None
self._active = False

def init(
Expand Down Expand Up @@ -317,4 +317,4 @@ def start_event_loop(loop: AbstractEventLoop) -> None:
def run_event_loop(loop: AbstractEventLoop) -> None:
"""run event loop"""
set_event_loop(loop)
loop.run_forever()
loop.run_forever()

0 comments on commit d79cd96

Please sign in to comment.