Skip to content

use-simple-lambdas is broken #43

@erikwright

Description

@erikwright

I get a stack trace when triggering this rule with a line like the following:

        return rdd.map(lambda row: ((row['key'], row['index']), row['value']))

Stack trace:

Traceback (most recent call last):
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/bin/pylint", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/bin/pylint", line 3, in <module>
    run_pylint()
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/__init__.py", line 13, in run_pylint
    Run(sys.argv[1:])
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/lint.py", line 1310, in __init__
    linter.check(args)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/lint.py", line 732, in check
    self._do_check(files_or_modules)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/lint.py", line 863, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/lint.py", line 944, in check_astroid_module
    walker.walk(ast_node)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 944, in walk
    self.walk(child)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 941, in walk
    cb(astroid)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 110, in visit_lambda
    self.__use_simple_lambdas(node)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 225, in __use_simple_lambdas
    self.add_message('use-simple-lambdas', node=node)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/checkers/__init__.py", line 90, in add_message
    self.linter.add_message(msg_id, line, node, args, confidence)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 385, in add_message
    msg_info = self.msgs_store.check_message_id(msg_descr)
  File "/Users/erikwright/.pyenv/virtualenvs/data_bang/3.5.2/src/pylint/pylint/utils.py", line 697, in check_message_id
    raise UnknownMessage('No such message id %s' % msgid)
pylint.utils.UnknownMessage: No such message id use-simple-lambdas
make: *** [lint] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions