Skip to content
Black formatter for Jupyter Notebook
Branch: master
Clone or download
Latest commit 3c9f761 Jun 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. update README Jun 22, 2019
demo.gif update demo Jun 22, 2019
jupyter-black.js fixes #2, #5 Jun 22, 2019
jupyter-black.yaml fixes #2, #5 Jun 22, 2019
kernel_exec_on_cell.js fixes #2, #5 Jun 22, 2019

Jupyter Black [Black formatter for Jupyter Notebook]

This extension reformats/prettifies code in a notebook's code cell by black.


pre-requisites: of course, you must have some of the corresponding packages installed:

pip install black [--user]

Then the extension provides

  • a toolbar button
  • a keyboard shortcut for reformatting the current code-cell (default: Ctrl-B)
  • a keyboard shortcut for reformatting whole code-cells (default: Ctrl-Shift-B)

Syntax shall be correct. The extension will also point basic syntax errors.


If you use jupyter-contrib-nbextensions, proceed as usual.

Otherwise, you can still install/try the extension from personal repo, using

jupyter nbextension install --user
jupyter nbextension enable jupyter-black-master/jupyter-black
You can’t perform that action at this time.