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.4
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.4.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for nb_move_imports-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dbf8b254ecdbe69cd681cd8702f53149a7a196d4b9ef724aa3664e3047d4a59 |
|
MD5 | fd2a9ea1e490244dd9ed2d7b15b95632 |
|
BLAKE2b-256 | 2726462e2f22bd7ce666e12599ba4d7584d3eb2f79b494659599b76cf3d72e79 |