Code formatter like nb_black for google colab

I don’t think there’s an extension directly in Colab.

What you could do, though, is to download your notebook, run

pip install -U nbqa
nbqa black notebook.ipynb

and then reupload your (now formatted) notebook to Colab


disclaimer: I’m the author of nbQA


UPDATE: as of version 21.8b0, black runs directly on notebooks, no third-party tool required

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)