{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / interactiveshell / InteractiveShell / should_run_async

function

IPython.core.interactiveshell:InteractiveShell.should_run_async

source: /dev/ipython/IPython/core/interactiveshell.py:3324

Signature

def should_run_async(self, raw_cell: str, *, transformed_cell = None, preprocessing_exc_tuple = None) → bool

Summary

Return whether a cell should be run asynchronously via a coroutine runner

Parameters

raw_cell : str

The code to be executed

transformed_cell: str

cell that was passed through transformers. Required (keyword only); run transform_cell yourself and pass the result here.

preprocessing_exc_tuple:

trace if the transformation failed.

Returns

: result: bool

Whether the code needs to be run with a coroutine runner or not

: .. versionadded:: 7.0
: .. versionchanged:: 9.16

transformed_cell is now required; the deprecated fallback that called transform_cell automatically has been removed.

Aliases

  • IPython.InteractiveShell.should_run_async