Created
November 26, 2021 16:09
-
-
Save basnijholt/af2e6c1f7c313a86b124c191ad9d6c2c to your computer and use it in GitHub Desktop.
Clean up and lint a notebook with black, isort, autoflake, pyupgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NB=FNAME.ipynb | |
pip install nbqa autoflake pyupgrade black isort nbconvert jupyter_contrib_nbextensions | |
nbqa isort $NB | |
nbqa black $NB | |
nbqa autoflake -i --remove-all-unused-imports $NB | |
nbqa pyupgrade $NB --py38-plus | |
jupyter nbconvert --clear-output --inplace $NB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment