Created
March 27, 2013 14:42
-
-
Save brent-hoover/5254712 to your computer and use it in GitHub Desktop.
Flake8 Git Commit hook
This file contains hidden or 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
| #!/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