Closed
Description
Bug description
Crash when parsing the following convo.py
: https://github.com/Dpeta/pesterchum-alt-servers/blob/62f3e21bd4699b04050b1d9ab3838aab9b2db28a/convo.py
Happens with 2.17.2
and 3.0.0a6
.
Command used
python -m pylint convo.py
Pylint output
pylint crashed with a ``AstroidError`` and with the following stacktrace:
Traceback (most recent call last):
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/lint/pylinter.py", line 772, in _lint_file
check_astroid_module(module)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/lint/pylinter.py", line 1001, in check_astroid_module
retval = self._check_astroid_module(
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/lint/pylinter.py", line 1047, in _check_astroid_module
walker.walk(node)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/checkers/modified_iterating_checker.py", line 60, in visit_for
self._modified_iterating_check_on_node_and_children(body_node, iter_obj)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/checkers/modified_iterating_checker.py", line 66, in _modified_iterating_check_on_node_and_children
self._modified_iterating_check(body_node, iter_obj)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/checkers/modified_iterating_checker.py", line 96, in _modified_iterating_check
obj_name = iter_obj.name
AttributeError: 'Call' object has no attribute 'name'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/lint/pylinter.py", line 736, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "/home/user/pchumenv/lib/python3.10/site-packages/pylint/lint/pylinter.py", line 774, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
Expected behavior
No crash.
Pylint version
pylint 3.0.0a6
astroid 2.15.3
Python 3.10.10 (main, Mar 5 2023, 22:26:53) [GCC 12.2.1 20230201]
OS / Environment
Arch Linux
Additional dependencies
PyQt6