Traceback (most recent call last):
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/lint/pylinter.py", line 789, in _lint_file
check_astroid_module(module)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/lint/pylinter.py", line 1018, in check_astroid_module
retval = self._check_astroid_module(
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/lint/pylinter.py", line 1070, in _check_astroid_module
walker.walk(node)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/checkers/refactoring/refactoring_checker.py", line 1814, in visit_comprehension
self._check_unnecessary_list_index_lookup(node)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/checkers/refactoring/refactoring_checker.py", line 2312, in _check_unnecessary_list_index_lookup
has_start_arg, confidence = self._enumerate_with_start(node)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/checkers/refactoring/refactoring_checker.py", line 2437, in _enumerate_with_start
start_val, confidence = self._get_start_value(start_arg)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/checkers/refactoring/refactoring_checker.py", line 2463, in _get_start_value
return node.operand.value, HIGH
AttributeError: 'Call' object has no attribute 'value'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/lint/pylinter.py", line 753, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "/home/redacted/.vscode-server/extensions/ms-python.pylint-2024.2.0/bundled/libs/pylint/lint/pylinter.py", line 791, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
Bug description
Very new to submitting bugs, and this is really easily circumvented, but the scary error message prompted me to post this in case it's something of use to Pylint developers.
When parsing the following
a.py:Pylint crashes with AstroidError.
The following code works without issues:
Configuration
Command used
Pylint output
pylint crashed with a ``AstroidError`` and with the following stacktrace:
Expected behavior
No crash.
Pylint version
OS / Environment
linux (Linux)
Additional dependencies