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

Use black.format_cell #35

Open MarcoGorelli opened 3 years ago

MarcoGorelli commented 3 years ago

black now has a function format_cell, which could be used directly. Would a PR to use this (instead of the current magic handling) be welcome?

n8henrie commented 2 years ago

Looks like it already uses this, right? https://github.com/dnanhkhoa/nb_black/search?q=format_cell&type=code

MarcoGorelli commented 2 years ago

That's different

n8henrie commented 2 years ago

Sorry, you're correct.

On Sat, Sep 11, 2021 at 12:11 AM Marco Edward Gorelli < @.***> wrote:

That's different

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dnanhkhoa/nb_black/issues/35#issuecomment-917349845, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJNQDCCCYANJO4CIM3YKY3UBLXK3ANCNFSM5DOQ5P2A .

MarcoGorelli commented 2 years ago

No worries :smile:

n8henrie commented 2 years ago

@MarcoGorelli It seems like work has slowed down on this, so I've created a fork with a few enhancements, including:

https://github.com/n8henrie/jupyter-black

MarcoGorelli commented 2 years ago

Wow, nice, thanks!