Created
May 2, 2020 13:05
-
-
Save QuentinN42/d02dd2242ac01572531b87026342df54 to your computer and use it in GitHub Desktop.
auto black over python file or jupyter notebook
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
#!/bin/bash | |
if [[ "$1" == *\.py ]] | |
then | |
$(black $1); | |
else | |
if [[ "$1" == *\.ipynb ]] | |
then | |
$(jblack $1); | |
else | |
echo "Error not python or jupyter file." | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment