Question

This is what I have currently:

sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore='W801,E128,E501,W402,F403'))

But it's complaining about django south migration files, so I want to exclude the migration files, my immediate guess was:

sys.exit(git_hook(complexity=COMPLEXITY, strict=STRICT, ignore='W801,E128,E501,W402,F403', exclude='migrations'))

but getting this error:

TypeError: git_hook() got an unexpected keyword argument 'exclude'

Go through the source code there is no such argument for me to use...

def git_hook(complexity=-1, strict=False, ignore=None, lazy=False):

Is there a way for me to exclude some files?

Was it helpful?

Solution

All I have to do is create the configuration file in ~/.config/flake8:

http://flake8.readthedocs.org/en/latest/config.html

or in project level create tox.ini.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top