Skip to content

Commit 2d8e8b0

Browse files
authored
fix: avoid ExceptionGroup wrapping in AnyIORelatedEvents.__aexit__
1 parent 891f363 commit 2d8e8b0

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

cq/_core/related_events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from abc import abstractmethod
22
from dataclasses import dataclass, field
33
from types import TracebackType
4-
from typing import Any, Protocol, Self, runtime_checkable
4+
from typing import Protocol, Self, runtime_checkable
55

66
from anyio import create_task_group
77
from anyio.abc import TaskGroup
@@ -36,8 +36,8 @@ async def __aexit__(
3636
exc_type: type[BaseException] | None,
3737
exc_value: BaseException | None,
3838
traceback: TracebackType | None,
39-
) -> Any:
40-
return await self.task_group.__aexit__(exc_type, exc_value, traceback)
39+
) -> None:
40+
await self.task_group.__aexit__(None, None, None)
4141

4242
def add(self, *events: Event) -> None:
4343
self.history.extend(events)

uv.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)