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

We need a checker on lab vs notebook. #16

Open michaelaye opened 4 years ago

michaelaye commented 4 years ago

Just got badly trapped by trying to use lab_black when running Jupyter notebook, it would be best if this could be done transparently on the plugin side. there should be a way to determine if it's run inside either?

dnanhkhoa commented 4 years ago

I agree with you about that. Unfortunately I have tried many ways but didn't work totally. I guess Jupyter Notebook and JupyerLab are just web application (frontend side) running on the same IPython backend so that using Python code won't work. Maybe checking environment variables or using Javascript inside could help. How about your idea?