Skip to content

Instantly share code, notes, and snippets.

@brent-hoover
Created March 27, 2013 14:42
Show Gist options
  • Select an option

  • Save brent-hoover/5254712 to your computer and use it in GitHub Desktop.

Select an option

Save brent-hoover/5254712 to your computer and use it in GitHub Desktop.
Flake8 Git Commit hook
#!/usr/bin/env python
import sys
from flake8.hooks import git_hook
COMPLEXITY = 10
STRICT = False
if __name__ == '__main__':
sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore='E501'))
# Alternatively
# sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT,
# ignore=['E501']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment