Use new top level portal import

ems_to_bidir_streaming
Tyler Goodlet 2021-06-04 12:54:26 -04:00
parent 0bcad35c70
commit 02459cd964
1 changed files with 9 additions and 2 deletions

View File

@ -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