From 02459cd964d067e487eb6aa896925ef9a6e42c63 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 4 Jun 2021 12:54:26 -0400 Subject: [PATCH] Use new top level portal import --- piker/brokers/ib.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/piker/brokers/ib.py b/piker/brokers/ib.py index 96398c44..915278c3 100644 --- a/piker/brokers/ib.py +++ b/piker/brokers/ib.py @@ -738,7 +738,7 @@ async def _trio_run_client_method( class _MethodProxy: def __init__( self, - portal: tractor._portal.Portal + portal: tractor.Portal ) -> None: self._portal = portal @@ -755,7 +755,12 @@ class _MethodProxy: ) -def get_client_proxy(portal, target=Client) -> _MethodProxy: +def get_client_proxy( + + portal: tractor.Portal, + target=Client, + +) -> _MethodProxy: proxy = _MethodProxy(portal) @@ -1197,8 +1202,10 @@ def pack_position(pos: Position) -> Dict[str, Any]: send_on_connect={'local_trades': 'start'} ) async def stream_trades( + loglevel: str = None, get_topics: Callable = None, + ) -> AsyncIterator[Dict[str, Any]]: # XXX: required to propagate ``tractor`` loglevel to piker logging