blackcellmagic
IPython magic command to format python code in cell using black.
What is the magic command?
%%blackSetup
Using pip
pip install blackcellmagicDirectly from the repository
git clone https://github.com/csurfer/blackcellmagic.git
python blackcellmagic/setup.py installLoad Extension in IPython
%load_ext blackcellmagicUsage
# To have it formatted to black default length 88.
%%black
# To have it formatted to a particular line length.
%%black -l 79
%%black --line_length 79Extras
Tobin Jones has been kind enough to develop a NPM package over blackcellmagic to format all cells at once which can be found here.
Contributing
Bug Reports and Feature Requests
Please use issue tracker for reporting bugs or feature requests.
Development
Pull requests are most welcome.
Buy the developer a cup of coffee!
If you found the utility helpful you can buy me a cup of coffee using

