Skip to content

pylint 1.6 chokes and dies on files which 1.5.6 was happy  #998

Closed
@tseaver

Description

Steps to reproduce

  1. git clone https://GoogleCloudPlatform/gcloud-python
  2. cd gcloud-python
  3. git checkout googleapis/google-cloud-python@aa56c9f
  4. tox -e lint --notest
  5. .tox/lint/bin/pylint --rcfile=scripts/pylint_default
    gcloud/bigtable/happybase/connection.py
  6. .tox/lint/bin/pylint --rcfile=scripts/pylint_default
    gcloud/streaming/http_wrapper.py

Current behavior

The 'happybase/connection.py' raises:

Traceback (most recent call last):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/__init__.py", line 11, in run_pylint
    Run(sys.argv[1:])
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 1308, in __init__
    linter.check(args)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 730, in check
    self._do_check(files_or_modules)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 861, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 942, in check_astroid_module
    walker.walk(ast_node)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 939, in walk
    cb(astroid)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/docparams.py", line 130, in visit_raise
    expected_excs = utils.possible_exc_types(node)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/_check_docs_utils.py", line 73, in possible_exc_types
    excs = set(exc for exc in excs if not node_ignores_exception(node, exc))
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/_check_docs_utils.py", line 73, in <genexpr>
    excs = set(exc for exc in excs if not node_ignores_exception(node, exc))
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/_check_docs_utils.py", line 71, in <genexpr>
    excs = (exc.name for exc in astroid.unpack_infer(handler.type))
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/astroid/bases.py", line 325, in raise_if_nothing_inferred
    for node in func(*args, **kwargs):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/astroid/node_classes.py", line 52, in unpack_infer
    inferred = next(stmt.infer(context))
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/astroid/bases.py", line 302, in wrapped
    for res in _func(node, context, **kwargs):
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/astroid/bases.py", line 329, in raise_if_nothing_inferred
    raise exceptions.InferenceError()
astroid.exceptions.InferenceError

The streaming/http_wrapper.py check raises:

Traceback (most recent call last):
  File ".tox/lint/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/__init__.py", line 11, in run_pylint
    Run(sys.argv[1:])
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 1308, in __init__
    linter.check(args)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 730, in check
    self._do_check(files_or_modules)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 861, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/lint.py", line 942, in check_astroid_module
    walker.walk(ast_node)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 942, in walk
    self.walk(child)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/utils.py", line 939, in walk
    cb(astroid)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/docparams.py", line 142, in visit_raise
    self._add_raise_message(missing_excs, func_node)
  File "/home/tseaver/projects/agendaless/Google/src/gcloud-python/.tox/lint/lib/python2.7/site-packages/pylint/extensions/docparams.py", line 286, in _add_raise_message
    args=(', '.join(sorted(missing_excs)),),
TypeError: sequence item 0: expected string, _Yes found

Expected behavior

Report errors without raising exceptions.

pylint --version output

$ .tox/lint/bin/pylint --rcfile="scripts/pylintrc_default" --version
pylint 1.6.1, 
astroid 1.4.7
Python 2.7.11 (default, Feb 22 2016, 07:44:44) 
[GCC 4.8.4]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions