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
************* Module crash
crash.py:8:0: C0305: Trailing newlines (trailing-newlines)
crash.py:1:0: C0114: Missing module docstring (missing-module-docstring)
crash.py:1:0: C0116: Missing functionor method docstring (missing-function-docstring)
Exception on node <For l.2 at 0x7fccd1fa95d0>in file '/tmp/pylintcrash/crash.py'
Traceback (most recent call last):
File "/tmp/pylintcrash/venv/lib/python3.10/site-packages/pylint/utils/ast_walker.py", line 90, in walk
callback(astroid)
File "/tmp/pylintcrash/venv/lib/python3.10/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 682, in visit_for
self._check_unnecessary_list_index_lookup(node)
File "/tmp/pylintcrash/venv/lib/python3.10/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 2118, in _check_unnecessary_list_index_lookup
has_start_arg, confidence = self._enumerate_with_start(node)
File "/tmp/pylintcrash/venv/lib/python3.10/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 2236, in _enumerate_with_start
start_val, confidence = self._get_start_value(start_arg)
File "/tmp/pylintcrash/venv/lib/python3.10/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 2260, in _get_start_value
start_val = node.value
AttributeError: 'BinOp' object has no attribute 'value'
crash.py:1:0: F0002: crash.py: Fatal error while checking 'crash.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in'/home/corbatto/.cache/pylint/pylint-crash-2022-12-20-08-35-59.txt'. (astroid-error)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
Expected behavior
Should not crash.
Pylint version
pylint 2.15.9
astroid 2.12.13
Python 3.10.8 (main, Nov 1 2022, 14:18:21) [GCC 12.2.0]
Likely introduced in this release, since we've been checking the exact same lines of code for months if not years without a crash.
OS / Environment
ArchLinux with zen kernel 6.0.12. Terminal: alacritty + tmux + zsh. It also happened on an ubuntu based bamboo worker, don't know the exact version.
Additional dependencies
No response
The text was updated successfully, but these errors were encountered:
Pierre-Sassoulas
added
Crash 💥
A bug that makes pylint crash
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
and removed
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
labels
Dec 20, 2022
This issue has already been fixed and does not happen on the current main branch. @Pierre-Sassoulas surprised the fix hasn't been released? It was fixed here #7824 and should've been backported.
It broke the maintenance branch so we reverted in #7855. We could release 2.16.0, but it's blocked by astroid's 2.13.0 release, which itself is blocked by pylint-dev/astroid#1189 and pylint-dev/astroid#1910. Another way to fix this would be to do a proper cherry-pick on the maintenance branch.
Bug description
Minimal example (in our code which initially triggered the bug, the addition consisted of one variable and one literal):
Configuration
# Default pylint config i.e. no config.
Command used
Pylint output
Expected behavior
Should not crash.
Pylint version
OS / Environment
ArchLinux with zen kernel 6.0.12. Terminal: alacritty + tmux + zsh. It also happened on an ubuntu based bamboo worker, don't know the exact version.
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: