Skip to content

Instantly share code, notes, and snippets.

@QuentinN42
Created May 2, 2020 13:05
Show Gist options
  • Save QuentinN42/d02dd2242ac01572531b87026342df54 to your computer and use it in GitHub Desktop.
Save QuentinN42/d02dd2242ac01572531b87026342df54 to your computer and use it in GitHub Desktop.
auto black over python file or jupyter notebook
#!/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