diff --git a/piker/brokers/__init__.py b/piker/brokers/__init__.py index 0c328d9f..94e4cbe1 100644 --- a/piker/brokers/__init__.py +++ b/piker/brokers/__init__.py @@ -98,13 +98,14 @@ async def open_cached_client( If one has not been setup do it and cache it. ''' - brokermod = get_brokermod(brokername) + brokermod: ModuleType = get_brokermod(brokername) + + # TODO: make abstract or `typing.Protocol` + # client: Client async with maybe_open_context( acm_func=brokermod.get_client, kwargs=kwargs, - ) as (cache_hit, client): - if cache_hit: log.runtime(f'Reusing existing {client}')