Format code cells in Jupyter Notebook and JupyterLab using black.
Project description
jupyterblack
Format code cells in Jupyter Notebook and JupyterLab using Black.
It's as simple as calling jblack
$ jblack notebook.ipynb
Install jupyterblack from the command line with pip
$ pip install jupyterblack
Usage
# Format one Jupyter file:
$ jblack notebook.ipynb
# Format multiple Jupyter files:
$ jblack notebook_1.ipynb notebook_2.ipynb [...]
# Format a directory:
$ jblack python/
# Format one Jupyter file with a line length of 70:
$ jblack -l 70 notebook.ipynb
# Show help:
$ jblack -h
Options
positional arguments:
targets
optional arguments:
-h, --help show this help message and exit
--check
--pyi
-l LINE_LENGTH, --line-length LINE_LENGTH
-s, --skip-string-normalization
-w WORKERS, --workers WORKERS
number of worker processes
--show-invalid-code
-t {py27,py33,py34,py35,py36,py37,py38} [{py27,py33,py34,py35,py36,py37,py38} ...], --target-version {py27,py33,py34,py35,py36,py37,py38} [{py27,py33,py34,py35,py36,py37,py38} ...]
Contribute
Support
If you are having issues or would like to propose a new feature, please use the issues tracker.
License
The project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jupyterblack-0.3.6.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for jupyterblack-0.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d095c18678d23269d6411971ff75eb491a3a7694915388c8b9e775c111b86dbb |
|
MD5 | 5efd612a44c56485105efd75755a524f |
|
BLAKE2b-256 | fbace6edc0b6c57ee3c5d35b7792887ce77d8b51a28f7dbcf40f661d317b6dc4 |