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

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

View File

@ -289,7 +289,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
@ -303,7 +306,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