MCPcopy
hub / github.com/nonebot/nonebot2 / flatten_exception_group

Function flatten_exception_group

nonebot/utils.py:333–340  ·  view source on GitHub ↗
(
    exc_group: BaseExceptionGroup[E],
)

Source from the content-addressed store, hash-verified

331
332
333def flatten_exception_group(
334 exc_group: BaseExceptionGroup[E],
335) -> Generator[E, None, None]:
336 for exc in exc_group.exceptions:
337 if isinstance(exc, BaseExceptionGroup):
338 yield from flatten_exception_group(exc)
339 else:
340 yield exc
341
342
343def get_name(obj: Any) -> str:

Callers 7

_handleFunction · 0.90
handle_exceptionMethod · 0.90
handle_exceptionMethod · 0.90
_handle_exceptionMethod · 0.90
_handle_skippedMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected