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.5
hooks:
- id: nb_move_imports
name: nb_move_imports
Release files for nb-move-imports 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nb_move_imports-0.4.5.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nb_move_imports-0.4.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / nb_move_imports-0.4.5.tar.gz
| Download URL | nb_move_imports-0.4.5.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c38a73487a03db8701171bec3ecbf54aa363bba6d38a1ac8d0e191fb59c24189
|
|
BLAKE2b-256 checksum How to use checksums |
867df9de8619dcc2589c401a2a7b17daf06ef3546a12e08da063016d9602d5a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.15 Linux/5.15.0-1036-azure
|
Release files / nb_move_imports-0.4.5-py3-none-any.whl
| Download URL | nb_move_imports-0.4.5-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60deb7d2628db3501826081221241107cdc4911a5004c4bc564f37687c5523ee
|
|
BLAKE2b-256 checksum How to use checksums |
6ad27d69192aec2f1204b02e18b4960f3dc5117da4bb31deed4373ef51413f65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.15 Linux/5.15.0-1036-azure
|