forked from goodboy/tractor
mypy fixes
parent
835d1fa07a
commit
9bb8a062eb
|
@ -357,10 +357,10 @@ class Actor:
|
||||||
# (i.e. no cid was provided in the msg - see above).
|
# (i.e. no cid was provided in the msg - see above).
|
||||||
# Push this error to all local channel consumers
|
# Push this error to all local channel consumers
|
||||||
# (normally portals) by marking the channel as errored
|
# (normally portals) by marking the channel as errored
|
||||||
tb_str = msg.pop('tb_str')
|
tb_str = msg.get('tb_str')
|
||||||
assert chan.uid
|
assert chan.uid
|
||||||
exc = InternalActorError(
|
exc = InternalActorError(
|
||||||
f"{self.channel.uid}\n" + tb_str,
|
f"{chan.uid}\n" + tb_str,
|
||||||
**msg,
|
**msg,
|
||||||
)
|
)
|
||||||
chan._exc = exc
|
chan._exc = exc
|
||||||
|
|
|
@ -60,7 +60,7 @@ class Portal:
|
||||||
# when this is set to a tuple returned from ``_submit()`` then
|
# when this is set to a tuple returned from ``_submit()`` then
|
||||||
# it is expected that ``result()`` will be awaited at some point
|
# it is expected that ``result()`` will be awaited at some point
|
||||||
# during the portal's lifetime
|
# during the portal's lifetime
|
||||||
self._result = None
|
self._result: Optional[Any] = None
|
||||||
# set when _submit_for_result is called
|
# set when _submit_for_result is called
|
||||||
self._expect_result: Optional[
|
self._expect_result: Optional[
|
||||||
Tuple[str, Any, str, Dict[str, Any]]
|
Tuple[str, Any, str, Dict[str, Any]]
|
||||||
|
|
|
@ -222,7 +222,7 @@ class ActorNursery:
|
||||||
|
|
||||||
log.debug(f"Waiting on all subactors to complete")
|
log.debug(f"Waiting on all subactors to complete")
|
||||||
children = self._children.copy()
|
children = self._children.copy()
|
||||||
errors = []
|
errors: List[Exception] = []
|
||||||
# wait on run_in_actor() tasks, unblocks when all complete
|
# wait on run_in_actor() tasks, unblocks when all complete
|
||||||
async with trio.open_nursery() as nursery:
|
async with trio.open_nursery() as nursery:
|
||||||
for subactor, proc, portal in children.values():
|
for subactor, proc, portal in children.values():
|
||||||
|
|
Loading…
Reference in New Issue