-
-
Save ricardosiri68/109a564d2c4f5aa04d57 to your computer and use it in GitHub Desktop.
Python pre-commit hook
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/sh | |
# make sure requirements.txt is up to date with every commit | |
# by comparing the output of pip freeze | |
source [virtualenv_path]/bin/activate | |
pip freeze | diff requirements.txt - > /dev/null | |
if [ $? != 0 ] | |
then | |
echo "Missing python module dependencies in requirements.txt. Run 'pip freeze > requirements.txt' to update." | |
deactivate | |
exit 1 | |
fi | |
# quite la parte que checkeaba los modulos con pyflakes | |
# y que revisaba que no se nos olvidaba un set_trace() en en el codigo | |
deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment