chore: Embrace the walrus operator (#24127)

This commit is contained in:
John Bodley
2023-05-19 00:37:13 -07:00
committed by GitHub
parent 6b5459121f
commit d583ca9ef5
54 changed files with 100 additions and 185 deletions

View File

@@ -148,8 +148,7 @@ class QueryCacheManager:
if not key or not _cache[region] or force_query:
return query_cache
cache_value = _cache[region].get(key)
if cache_value:
if cache_value := _cache[region].get(key):
logger.debug("Cache key: %s", key)
stats_logger.incr("loading_from_cache")
try: