1. Tarek Ziadé
  2. flake8
  3. Pull requests

Pull requests

#28 Merged
Repository
Deleted repository
Branch
default (0aec4c3f35cb)
Repository
flake8
Branch
default

Fixes critical bug in 'flake8/util.py' causing 'flake8' to crash during code analysis.

Author
  1. Bruno Miguel Custódio
Reviewers
Description

The 1.6.1 version introduced a critical bug which is preventing its usage with most of my projects...

(.venv-2.7)bmcustodio@bmcustodio:~/projects/brunomcustodio.com$ flake8 --ignore=E128,E501,W402 homepage setup.py
Traceback (most recent call last):
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/bin/flake8", line 8, in <module>
    load_entry_point('flake8==1.6.1', 'console_scripts', 'flake8')()
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/local/lib/python2.7/site-packages/flake8/run.py", line 73, in main
    warnings += check_file(path, options.ignore, complexity)
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/local/lib/python2.7/site-packages/flake8/run.py", line 26, in check_file
    warnings = pyflakes.checkPath(path, ignore)
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/local/lib/python2.7/site-packages/flake8/pyflakes.py", line 659, in checkPath
    return check(open(filename, 'U').read() + '\n', ignore, filename)
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/local/lib/python2.7/site-packages/flake8/pyflakes.py", line 717, in check
    if skip_warning(warning, ignore):
  File "/home/bmcustodio/Eclipse/Workspace/brunomcustodio.com/.venv-2.7/local/lib/python2.7/site-packages/flake8/util.py", line 8, in skip_warning
    if not hasattr(warning, message):
NameError: global name 'message' is not defined

The attached patch fixes this issue... I think that the 1.6.1 release should be re-tagged and re-published to PyPI as soon as possible (or that an 1.6.2 version be released with this fix).

Comments (0)