nb-code-formatter
code formatter for ipynb files.
this tool uses Black for formatting code and isort for sorting imports.
Quick Start
Install the package
pip install nb-code-formatter
format code your ipynb file
overwrite existing notebook file
nbcodefmt your_notebook.ipynb
write to new notebook file
nbcodefmt your_notebook.ipynb new_notebook.ipynb