ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.2k stars 805 forks source link

Have code_prettify use an external tool? #1626

Open mforbes opened 1 year ago

mforbes commented 1 year ago

Would be possible/easy to have code_prettify use an external tool? Currently I have to include the prettifier yapf as a kernel dependency, but this is poor practice in principle (introduces additional project dependencies with potential conflicts, etc.) Instead, we are moving to a different model where all such tools are installed at the system or environment level (pipx install yapf for example) and it would be very nice if code_prettify could use these installations instead.

As it seems to be based on KernelExecOnCells, I am not sure how easy this would be. Is it an easy change or should one develop a new extension?