Ian Cordasco committed 23068ac

Comment some lines

Comments (0)

Files changed (1)

     global pep8style
     # parse out our flags so pep8 doesn't get confused
     parser = get_parser()
-    opts, _ = pep8.process_options(parse_argv=True, parser=parser)
+    # This is required so we can parse out our added options
+    opts, args = pep8.process_options(parse_argv=True, parser=parser)
     if opts.install_hook:
         from flake8.hooks import install_hook
     sys.argv.insert(0, 'pep8')
+    # We then have to re-parse argv to make sure pep8 is properly initialized
     pep8style = pep8.StyleGuide(parse_argv=True, config_file=True)
-    options = pep8style.options
     warnings = 0
     stdin = None
         orig_builtins = set(flakey.checker._MAGIC_GLOBALS)
         flakey.checker._MAGIC_GLOBALS = orig_builtins | builtins
-    if pep8style.paths and options.filename is not None:
+    if pep8style.paths and pep8style.options.filename is not None:
         for path in _get_python_files(pep8style.paths):
             if path == '-':
                 if stdin is None:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.