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
from __future__ import absolute_import
from abc import abstractmethod
class ApplianceConfig:
# Implemented in child class.
def _get_details(self):
pass
def __generate_reponse_file_data(self):
d = {}
if len(self._get_details()):
d['key'] = json.dumps(self._get_details())
Current behavior
Traceback (most recent call last):
File "/opt/venv/lib64/python3.6/site-packages/astroid/decorators.py", line 135, in raise_if_nothing_inferred
yield next(generator)
StopIteration: {'node': <Call l.12 at 0x7f734a9b1be0>, 'context': <astroid.context.InferenceContext object at 0x7f734a9bc888>}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/venv/bin/pylint", line 11, in <module>
▽
sys.exit(run_pylint())
File "/opt/venv/lib64/python3.6/site-packages/pylint/__init__.py", line 22, in run_pylint
PylintRun(sys.argv[1:])
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/run.py", line 358, in __init__
linter.check(args)
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/pylinter.py", line 863, in check
self.get_ast, self._iterate_file_descrs(files_or_modules)
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/pylinter.py", line 896, in _check_files
self._check_file(get_ast, check_astroid_module, name, filepath, modname)
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/pylinter.py", line 922, in _check_file
check_astroid_module(ast_node)
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/pylinter.py", line 1055, in check_astroid_module
ast_node, walker, rawcheckers, tokencheckers
File "/opt/venv/lib64/python3.6/site-packages/pylint/lint/pylinter.py", line 1099, in _check_astroid_module
walker.walk(ast_node)
File "/opt/venv/lib64/python3.6/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
File "/opt/venv/lib64/python3.6/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
File "/opt/venv/lib64/python3.6/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
[Previous line repeated 1 more time]
File "/opt/venv/lib64/python3.6/site-packages/pylint/utils/ast_walker.py", line 72, in walk
callback(astroid)
File "/opt/venv/lib64/python3.6/site-packages/pylint/checkers/refactoring/len_checker.py", line 76, in visit_call
instance = next(len_arg.infer())
File "/opt/venv/lib64/python3.6/site-packages/astroid/node_classes.py", line 366, in infer
yield from self._infer(context, **kwargs)
File "/opt/venv/lib64/python3.6/site-packages/astroid/decorators.py", line 140, in raise_if_nothing_inferred
raise exceptions.InferenceError(**error.args[0]) from error
astroid.exceptions.InferenceError: Inference failed for <Call l.12 at 0x7f734a9b1be0>.
Expected behavior
Pylint should not crash. I was using pylint==2.6.0 earlier and this crash was not observed.
@hyde-00 thanks for your report. I confirm that the bug does not occur anymore with the master branch and as it seems to be a duplicate i close this issue.
Steps to reproduce
Minimum code to reproduce pylint crash:
Current behavior
Expected behavior
Pylint should not crash. I was using pylint==2.6.0 earlier and this crash was not observed.
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: