forked from goodboy/tractor
1
0
Fork 0

Slight lint fixes

aio_error_propagation^2
Tyler Goodlet 2022-07-15 11:18:48 -04:00
parent 565c603300
commit 05790a20c1
2 changed files with 2 additions and 5 deletions

View File

@ -14,7 +14,6 @@ import tractor
from tractor import ( from tractor import (
to_asyncio, to_asyncio,
RemoteActorError, RemoteActorError,
ContextCancelled
) )
from tractor.trionics import BroadcastReceiver from tractor.trionics import BroadcastReceiver
@ -199,7 +198,7 @@ def test_context_spawns_aio_task_that_errors(
''' '''
Verify that spawning a task via an intertask channel ctx mngr that Verify that spawning a task via an intertask channel ctx mngr that
errors correctly propagates the error back from the `asyncio`-side errors correctly propagates the error back from the `asyncio`-side
taksk. task.
''' '''
async def main(): async def main():
@ -223,7 +222,6 @@ def test_context_spawns_aio_task_that_errors(
await trio.sleep_forever() await trio.sleep_forever()
with pytest.raises(RemoteActorError) as excinfo: with pytest.raises(RemoteActorError) as excinfo:
trio.run(main) trio.run(main)

View File

@ -23,7 +23,6 @@ from asyncio.exceptions import CancelledError
from contextlib import asynccontextmanager as acm from contextlib import asynccontextmanager as acm
from dataclasses import dataclass from dataclasses import dataclass
import inspect import inspect
import traceback
from typing import ( from typing import (
Any, Any,
Callable, Callable,
@ -297,7 +296,7 @@ def _run_asyncio_task(
elif task_err is None: elif task_err is None:
assert aio_err assert aio_err
aio_err.with_traceback(aio_err.__traceback__) aio_err.with_traceback(aio_err.__traceback__)
log.error(f'infected task errorred') log.error('infected task errorred')
# XXX: alway cancel the scope on error # XXX: alway cancel the scope on error
# in case the trio task is blocking # in case the trio task is blocking