pep8 will now recognize .flake8

But this will not guarantee that a section titled `[flake8]` will be parsed.
This will take more work.

re: #56
This commit is contained in:
Ian Cordasco 2013-01-22 10:38:47 -05:00
parent 9445a25f50
commit 7ad7b0ea7a

View file

@ -7,13 +7,14 @@ from flake8 import mccabe
from flake8.util import _initpep8, skip_file, get_parser
pep8style = None
pep8.PROJECT_CONFIG = ('.flake8', '.pep8', 'tox.ini', 'setup.cfg')
def main():
global pep8style
# parse out our flags so pep8 doesn't get confused
parser = get_parser()
opts, _ = parser.parse_args()
opts, _ = pep8.process_options(parse_argv=True, parser=parser)
if opts.install_hook:
from flake8.hooks import install_hook