alexcouper / captainhook

Git hook scripts
BSD 3-Clause "New" or "Revised" License
54 stars 14 forks source link

Bug with pyflakes checker. #60

Closed alexcouper closed 10 years ago

alexcouper commented 10 years ago
Traceback (most recent call last):
  File ".git/hooks/pre-commit", line 122, in <module>
    exit_code = main(commit_only=not args.all)
  File ".git/hooks/pre-commit", line 103, in main
    errors = mod.run(files)
  File "/Users/alex/Work/pretenders/ployst/.git/hooks/checkers/flake8_checker.py", line 45, in run
    flake8_style.check_files(py_files)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pep8.py", line 1624, in check_files
    runner(path)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/flake8/engine.py", line 73, in input_file
    return fchecker.check_all(expected=expected, line_offset=line_offset)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pep8.py", line 1366, in check_all
    self.check_ast()
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pep8.py", line 1345, in check_ast
    checker = cls(tree, self.filename)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pyflakes/checker.py", line 253, in __init__
    self.handleChildren(tree)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pyflakes/checker.py", line 520, in handleChildren
    self.handleNode(node, tree)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pyflakes/checker.py", line 555, in handleNode
    handler(node)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pyflakes/checker.py", line 702, in FUNCTIONDEF
    self.LAMBDA(node)
  File "/Users/alex/.virtualenvs/ployst/lib/python2.7/site-packages/pyflakes/checker.py", line 722, in LAMBDA
    for arg in node.args.args + node.args.kwonlyargs:
AttributeError: 'arguments' object has no attribute 'kwonlyargs'

Tox.ini

[captainhook]
pdb=on
flake8=on
alexcouper commented 10 years ago

Solved by doing pip install -U flake8