Move import statements in jupyter notebook to the first cell
Project description
nb_move_imports
Move import statements in jupyter notebook to the first cell
Use nb_move_imports
To run the script on a specific jupyter notebook run:
nb_move_imports path/to/notebook.ipynb
Skip processing of cells
In order to skip a cell you have to tag it with the IGNORE_MV_IMPORTS
tag.
Precommit Hook
Add this section to your pre-commit-config.yaml
so that the nb_move_imports script is executed before each commit with pre-commit.
- repo: https://github.com/AnH0ang/nb_move_imports
rev: 0.4.0
hooks:
- id: nb_move_imports
name: nb_move_imports
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nb_move_imports-0.4.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for nb_move_imports-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a384ef28738e6f1a440d2b9d223b040505753982e8e156b2fe89b5559d78f2 |
|
MD5 | 5ae4ea6f8d4e43945d2069352c75ec7e |
|
BLAKE2b-256 | dcb3bc2d83974ef140efa0594232b80e556a632402fb04a9475f024bded1c0d4 |