()
| 81 | |
| 82 | @asynccontextmanager |
| 83 | async def create_collapsing_task_group() -> AsyncGenerator[anyio.abc.TaskGroup, None]: |
| 84 | try: |
| 85 | async with anyio.create_task_group() as tg: |
| 86 | yield tg |
| 87 | except BaseExceptionGroup as excs: |
| 88 | if len(excs.exceptions) != 1: |
| 89 | raise |
| 90 | |
| 91 | exc = excs.exceptions[0] |
| 92 | context = None if exc.__suppress_context__ else exc.__context__ |
| 93 | raise exc from exc.__cause__ or context |
| 94 | |
| 95 | |
| 96 | def get_route_path(scope: Scope) -> str: |
no outgoing calls