gh-134451: Converted asyncio.tools.CycleFoundException from dataclass to a regular exception type. (#134513)

This commit is contained in:
Evgeny Demchenko 2025-05-23 08:15:21 +03:00 committed by GitHub
parent 5804ee7b46
commit f9324cb3cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -13,11 +13,17 @@ class NodeType(Enum):
TASK = 2
@dataclass(frozen=True)
class CycleFoundException(Exception):
"""Raised when there is a cycle when drawing the call tree."""
cycles: list[list[int]]
id2name: dict[int, str]
def __init__(
self,
cycles: list[list[int]],
id2name: dict[int, str],
) -> None:
super().__init__(cycles, id2name)
self.cycles = cycles
self.id2name = id2name
# ─── indexing helpers ───────────────────────────────────────────

View file

@ -0,0 +1 @@
Converted ``asyncio.tools.CycleFoundException`` from dataclass to a regular exception type.