Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 2, 2025
1 parent c1c4fe8 commit 1454455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/anyio/_backends/_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,6 @@ def process_exception(exc: BaseException) -> None:
else:
task_status_future.set_exception(exc)


def simple_task_done(_task: asyncio.Task) -> None:
self._tasks.discard(_task)
exc = get_exception(_task)
Expand Down Expand Up @@ -1169,7 +1168,9 @@ async def cancel_and_wait() -> None:

task_factory = loop.get_task_factory()
if is_eager(task_factory):
spawn_task: asyncio.Task = task_factory(loop, create(), name=f"spawn {name}") # type: ignore[assignment, misc, call-arg]
spawn_task: asyncio.Task = task_factory(
loop, create(), name=f"spawn {name}"
) # type: ignore[assignment, misc, call-arg]
self._tasks.add(spawn_task)
spawn_task.add_done_callback(simple_task_done)
return await_task_cancel_and_wait
Expand Down

0 comments on commit 1454455

Please sign in to comment.