You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An IndexError exception is raised and pylint crashes:
$ pylint test.py
************* Module test
test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
test.py:4:0: C0115: Missing class docstring (missing-class-docstring)
Traceback (most recent call last):
File "/Users/me/.pyenv/versions/clean/bin/pylint", line 11, in <module>
sys.exit(run_pylint())
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/__init__.py", line 23, in run_pylint
PylintRun(sys.argv[1:])
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/lint.py", line 1731, in __init__
linter.check(args)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/lint.py", line 1004, in check
self._do_check(files_or_modules)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/lint.py", line 1165, in _do_check
self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/lint.py", line 1252, in check_astroid_module
walker.walk(ast_node)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 77, in walk
self.walk(child)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/utils/ast_walker.py", line 74, in walk
callback(astroid)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/checkers/classes.py", line 755, in visit_classdef
self._check_bases_classes(node)
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/checkers/classes.py", line 1537, in _check_bases_classes
if class_is_abstract(node):
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/pylint/checkers/utils.py", line 929, in class_is_abstract
for method in node.methods():
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/astroid/scoped_nodes.py", line 2547, in methods
for meth in astroid.mymethods():
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/astroid/scoped_nodes.py", line 2559, in mymethods
for member in self.values():
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/astroid/scoped_nodes.py", line 276, in values
return [self[key] for key in self.keys()]
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/astroid/scoped_nodes.py", line 276, in <listcomp>
return [self[key] for key in self.keys()]
File "/Users/me/.pyenv/versions/3.6.6/envs/clean/lib/python3.6/site-packages/astroid/scoped_nodes.py", line 252, in __getitem__
return self.locals[item][0]
IndexError: list index out of range
Expected behavior
pylint should not crash.
pylint --version output
astroid 2.3.3
Python 3.6.6 (default, Feb 12 2019, 20:41:17)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)]
The text was updated successfully, but these errors were encountered:
Steps to reproduce
test.py
:pylint test.py
.Current behavior
An
IndexError
exception is raised andpylint
crashes:Expected behavior
pylint
should not crash.pylint --version output
The text was updated successfully, but these errors were encountered: