dnanhkhoa / nb_black

A simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using black.
MIT License
367 stars 41 forks source link

nb_black is breaking the %load magic on jupyter lab #1

Closed michaelaye closed 5 years ago

michaelaye commented 5 years ago

Hi! Thanks for your useful extension. I discovered though that it breaks the %load magic on jupyterlab, that is loading source code into notebooks. It is NOT broken in notebooks, interestingly.

You can test it easily by doing:

import pathlib
%load -n pathlib.Path

which loads the class code into jupyterlab fine.

But if you repeat it with loading your extension first:

%load_ext lab_black
import pathlib
%load -n pathlib.Path

nothing happens.

dnanhkhoa commented 5 years ago

Thank you for pointing it out, I will try to fix it as soon as possible.