Drop unused walrus assign of `re`

multihomed
Tyler Goodlet 2024-01-02 11:21:20 -05:00
parent 00024181cd
commit ce7b8a5e18
1 changed files with 4 additions and 3 deletions

View File

@ -62,6 +62,7 @@ if TYPE_CHECKING:
log = get_logger(__name__)
# TODO: make this a msgspec.Struct!
@dataclass
class Context:
'''
@ -491,7 +492,7 @@ class Context:
if self._cancel_called:
# XXX NOTE: ALWAYS RAISE any remote error here even if
# it's an expected `ContextCancelled` (after some local
# it's an expected `ContextCancelled` due to a local
# task having called `.cancel()`!
#
# WHY: we expect the error to always bubble up to the
@ -499,7 +500,7 @@ class Context:
# absorbed there (silently) and we DO NOT want to
# actually try to stream - a cancel msg was already
# sent to the other side!
if re := self._remote_error:
if self._remote_error:
raise self._remote_error
# XXX NOTE: if no `ContextCancelled` has been responded