Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Parameters
----------
ntbk : string | instance of NotebookNode
The input notebook.
max_output_lines : int | None
The maximum number of lines allowed in notebook outputs.
"""
if isinstance(ntbk, (str, type(Path))):
ntbk = Path(ntbk)
wd = str(ntbk.parent)
ntbk = str(ntbk)
else:
wd = str(Path())
ntbk = _check_nb_file(ntbk)
ntbk = execute(ntbk, cwd=wd)
return ntbk