black-nb
black-nb copied to clipboard
Runs black on code cells in a Jupyter notebook
Copied from the [thread](https://github.com/psf/black/issues/2554) Repro steps: 1. Create the minimal jupyter notebook, which will contain one cell with the function ands a comment, containing question mark; ``` def example_fn(param): """...
It would be nice to also parse markdown cells to find code cells that matches python language and also format those with black to be consistent in the style.
``` Traceback (most recent call last): File "./env/bin/black-nb", line 8, in sys.exit(cli()) File "./env/lib/python3.9/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "./env/lib/python3.9/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx)...