Closed ilia-db closed 2 weeks ago
Almost all of the magics we handle are actual cell magics, so it makes sense to only process them if they are at the start of the cell. But we also handle $run
in the same way, which looks incorrect
Isn't that how %run
works?
From the docs:
%run must be in a cell by itself, because it runs the entire notebook inline.
Good point. In ipython
it's possible to have multiple %run commands, but I forgot about databricks differences. In the extension we run things with the local ipython, but it makes more sense to be in line with databricks logic, otherwise it won't be possible to run the same file remotely.
Going to close the issue and the PR, thanks a lot for the comment
Describe the bug Magics that start with the
# MAGIC
comment aren't handled unless they appear at the start of the cell. There's also an unexpected behaviour when executing the magic at the top of the cell - the cell itself is ignored.To Reproduce Steps to reproduce the behavior:
Screenshots If applicable, add screenshots to help explain your problem.
System information:
Help: About
command (CMD-Shift-P).Databricks Extension Logs Please attach the databricks extension logs
Additional context Add any other context about the problem here.