Go multi-line-style tuples in `maybe_enter_context()`

Allows for an inline comment of the first "cache hit" bool element.
to_asyncio_eoc_signal
Tyler Goodlet 2025-07-15 16:12:06 -04:00
parent e949839edf
commit 735dc9056a
1 changed files with 8 additions and 2 deletions

View File

@ -294,7 +294,10 @@ async def maybe_open_context(
) )
_Cache.users += 1 _Cache.users += 1
lock.release() lock.release()
yield False, yielded yield (
False, # cache_hit = "no"
yielded,
)
else: else:
_Cache.users += 1 _Cache.users += 1
@ -308,7 +311,10 @@ async def maybe_open_context(
# f'{ctx_key!r} -> {yielded!r}\n' # f'{ctx_key!r} -> {yielded!r}\n'
) )
lock.release() lock.release()
yield True, yielded yield (
True, # cache_hit = "yes"
yielded,
)
finally: finally:
_Cache.users -= 1 _Cache.users -= 1