(coro)
| 58 | assert iscoroutine(coro) |
| 59 | |
| 60 | def get_name(coro): |
| 61 | # Coroutines compiled with Cython sometimes don't have |
| 62 | # proper __qualname__ or __name__. While that is a bug |
| 63 | # in Cython, asyncio shouldn't crash with an AttributeError |
| 64 | # in its __repr__ functions. |
| 65 | if hasattr(coro, '__qualname__') and coro.__qualname__: |
| 66 | coro_name = coro.__qualname__ |
| 67 | elif hasattr(coro, '__name__') and coro.__name__: |
| 68 | coro_name = coro.__name__ |
| 69 | else: |
| 70 | # Stop masking Cython bugs, expose them in a friendly way. |
| 71 | coro_name = f'<{type(coro).__name__} without __name__>' |
| 72 | return f'{coro_name}()' |
| 73 | |
| 74 | def is_running(coro): |
| 75 | try: |
no outgoing calls
no test coverage detected
searching dependent graphs…