Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permanently Enabling nb_black #14

Open
fweth opened this issue Nov 13, 2019 · 1 comment
Open

Permanently Enabling nb_black #14

fweth opened this issue Nov 13, 2019 · 1 comment

Comments

@fweth
Copy link

fweth commented Nov 13, 2019

I would really like to permanently enable nb_black in Jupyter Notebook, but unfortunately, when I put c.InteractiveShellApp.extensions = ['nb_black] in my IPython profile, I get the output <IPython.core.display.Javascript object> after each line of evaluation in IPython.

Editing ~/.local/lib/python3.7/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_config.py worked as intended, but is not a very elegant solution.

Is there any possibility to specify a IPython profile which should only be used by Jupyter? Or maybe make nb_black more agnostic towards IPython, so that it only shows effect in Jupyter Notebook?

@mazzma12
Copy link

mazzma12 commented Jun 3, 2020

Is there any possibility to specify an IPython profile which should only be used by Jupyter? Or maybe make nb_black more agnostic towards IPython, so that it only shows effect in Jupyter Notebook?

I would not recommend solution 2 as one may often switch between lab or notebook. IMO solution 1 would work, but the best would be to have one name for the extension and change the behavior depending on if it runs in Jupiter lab or notebook.
That being said, I haven't look at the code, so I don't know if it is feasible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants