You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Martin Hafskjold Thoresen edited this page Oct 18, 2016
·
2 revisions
We will set up a Git-hook to run flake8 and isort -rc each time we commit, in order to avoid waiting for 15 minutes on CirclejerkCI, just to know that some imports in a migration was in the wrong order.
Step 0
You need isort and flake8. Duh.
Step I
Create the file .git/hooks/pre-commit (the .git/ directory is located in the top level of the project)
Step II
Put this in:
#!/bin/bash
isort -rc lego
flake8 lego
Step III
You are done. Enjoy not failing on CI each time you push 💯