From 759ebe71e9843ac40dccb432ec8278a337d028fd Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 20 Jul 2023 15:27:46 -0400 Subject: [PATCH] Allow disabling symcache load via kwarg as well --- piker/data/_symcache.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/piker/data/_symcache.py b/piker/data/_symcache.py index 1745d293..3bf30d48 100644 --- a/piker/data/_symcache.py +++ b/piker/data/_symcache.py @@ -322,6 +322,7 @@ async def open_symcache( reload: bool = False, only_from_memcache: bool = False, # no API req + _no_symcache: bool = False, # no backend support ) -> SymbologyCache: @@ -337,11 +338,15 @@ async def open_symcache( # (easily) and thus we allow for an empty instance to be loaded # and manually filled in at the whim of the caller presuming # the backend pkg-module is annotated appropriately. - if getattr(mod, '_no_symcache', False): + if ( + getattr(mod, '_no_symcache', False) + or _no_symcache + ): yield SymbologyCache( mod=mod, fp=cachefile, ) + # don't do nuttin return # actor-level cache-cache XD