Skip to content

Instantly share code, notes, and snippets.

@robhudson
Created April 2, 2013 22:38
Show Gist options
  • Select an option

  • Save robhudson/5296851 to your computer and use it in GitHub Desktop.

Select an option

Save robhudson/5296851 to your computer and use it in GitHub Desktop.
.git/hooks/pre-commit and flake8
#!/usr/bin/env python
import sys
from flake8.run import git_hook
ignore = [
'E121',
'E123',
'E124',
'E125',
'E126',
'E127',
'E128',
]
if __name__ == '__main__':
sys.exit(git_hook(strict=True, lazy=True, ignore=ignore))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment