nbproject.dev.check_consecutiveness

nbproject.dev.check_consecutiveness(nb, calling_statement=None)

Check whether code cells have been executed consecutively.

Needs to be called in the last code cell of a notebook. Otherwise raises RuntimeError.

Returns cell transitions that violate execution at increments of 1 as a list of tuples.

Parameters:
  • nb (Notebook) – Notebook content.

  • calling_statement (str | None, default: None) – The statement that calls this function.

Return type:

bool