{ } Raw JSON

bundles / IPython 9.13.0 / IPython / core / async_helpers / _should_be_async

function

IPython.core.async_helpers:_should_be_async

source: /IPython/core/async_helpers.py :138

Signature

def   _should_be_async ( cell : str )  →  bool

Summary

Detect if a block of code needs to be wrapped in an async def

Extended Summary

If the code block has a top-level return statement or is otherwise invalid, False will be returned.

Aliases

  • IPython.core.async_helpers._should_be_async