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