Skip to content

Instantly share code, notes, and snippets.

@noahp
Last active November 8, 2018 14:09
Show Gist options
  • Save noahp/0ef6f8cee98bdfce23b79a22d2e2b648 to your computer and use it in GitHub Desktop.
Save noahp/0ef6f8cee98bdfce23b79a22d2e2b648 to your computer and use it in GitHub Desktop.
python black formatter wrapper for py2 envs
#!/usr/bin/env bash
# Place this script somewhere in $PATH and chmod +x it!
# use system python3 (eg `sudo apt install python3-pip && pip3 install black`)
python3 -m black "$@"
# # alternative form, for python3 virtualenv
# ~/.virtualenvs/py3/bin/python -m black "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment