Return True if the given function seems to be an async function or an async generator.
(func: object)
| 78 | |
| 79 | |
| 80 | def is_async_function(func: object) -> bool: |
| 81 | """Return True if the given function seems to be an async function or |
| 82 | an async generator.""" |
| 83 | return iscoroutinefunction(func) or inspect.isasyncgenfunction(func) |
| 84 | |
| 85 | |
| 86 | def getlocation(function, curdir: Optional[str] = None) -> str: |