Blackcellmagic
IPython magic command to format python code in cell using black.
Install / Use
/learn @csurfer/BlackcellmagicREADME
blackcellmagic
IPython magic command to format python code in cell using black.

What is the magic command?
%%black
Setup
Using pip
pip install blackcellmagic
Directly from the repository
git clone https://github.com/csurfer/blackcellmagic.git
python blackcellmagic/setup.py install
Load Extension in IPython
%load_ext blackcellmagic
Usage
# To have it formatted to black default length 88 with string normalization.
%%black
# To have it formatted to a particular line length.
%%black -l 79
%%black --line-length 79
# To skip string normalization.
%%black -S
%%black --skip-string-normalization
Extras
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
Related Skills
node-connect
338.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.6kCommit, push, and open a PR

