nbdev
nbdev copied to clipboard
Throw a warning when imports and code are mixed in a cell
Right now we don't have good error messages when imports & code are mixed in a cell and things can hang leaving the user confused. We should catch this and throw a warning
Note: it's fine to mix in an exported cell
@jph00 I am not sure if this is true. I have a simple notebook with constants.ipynb
and it has basically
#export
import os, inspect
__file = inspect.getfile(lambda: None)
ROOT_DIR = 'here'
running nbdev_preview
yields
Preparing to preview
[ 1/13] constants.ipynb
ERROR: No language set for Jupyter notebook