dreadatour / Flake8Lint

Sublime Text plugin for lint Python files
234 stars 58 forks source link

f-strings fails linter. #106

Open hadrien opened 7 years ago

hadrien commented 7 years ago

Due to old version of pyflakes

$ echo "foo = f'{bar}'" | python lint.py --pyflakes
Traceback (most recent call last):
  File "lint.py", line 405, in <module>
    for lint_warning in lint(stdin_lines, lint_settings):
  File "lint.py", line 238, in lint
    w = pyflakes_checker.Checker(tree)
  File "contrib/pyflakes/checker.py", line 294, in __init__
    self.handleChildren(tree)
  File "contrib/pyflakes/checker.py", line 567, in handleChildren
    self.handleNode(node, tree)
  File "contrib/pyflakes/checker.py", line 609, in handleNode
    handler(node)
  File "contrib/pyflakes/checker.py", line 567, in handleChildren
    self.handleNode(node, tree)
  File "contrib/pyflakes/checker.py", line 608, in handleNode
    handler = self.getNodeHandler(node.__class__)
  File "contrib/pyflakes/checker.py", line 462, in getNodeHandler
    self._nodeHandlers[node_class] = handler = getattr(self, nodeType)
AttributeError: 'Checker' object has no attribute 'JOINEDSTR'
hadrien commented 7 years ago

With pyflake 1.5.0:

$ echo "foo = f'{bar}'" | python lint.py --pyflakes
1:1:F821 undefined name 'bar'