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 blib2to3.pygram
.pylint_primer_tests/black/src/blib2to3/pygram.py:24:0: R0205: Class 'Symbols' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
.pylint_primer_tests/black/src/blib2to3/pygram.py:158:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:159:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:160:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:161:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:162:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:163:4: W0603: Using the global statement (global-statement)
.pylint_primer_tests/black/src/blib2to3/pygram.py:164:4: W0603: Using the global statement (global-statement)
Exception on node <Name.python_grammar l.175 at 0x7ff390d60c40>in file '/home/pierre/pylint/.pylint_primer_tests/black/src/blib2to3/pygram.py'
Traceback (most recent call last):
File "/home/pierre/pylint/pylint/utils/ast_walker.py", line 75, in walk
callback(astroid)
File "/home/pierre/pylint/pylint/checkers/variables.py", line 1189, in visit_name
elif self._is_only_type_assignment(node, name, defstmt):
File "/home/pierre/pylint/pylint/checkers/variables.py", line 1560, in _is_only_type_assignment
forref_nodeinnode.scope().locals[name][1:]:
KeyError: 'python_grammar'
.pylint_primer_tests/black/src/blib2to3/pygram.py:1:0: F0001: Fatal error while checking '.pylint_primer_tests/black/src/blib2to3/pygram.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/pierre/.cache/pylint/pylint-crash-2021-10-17-15.txt'. (fatal)
Expected behavior
Pylint should handle the case where the name does not exists without crash.
Not from the initial report. However I mentioned it in a comment without know about it 😅 #5162 (comment)
Let's close this one and continue to track it in #5162
Bug description
While parsing https://github.com/psf/black/blob/main/src/blib2to3/pygram.py getting an
exception on node <Name.python_grammar l.175 at 0x7ff390d60c40>
pylint crashed with a
KeyError
and with the following stacktrace:Command used
Pylint output
Expected behavior
Pylint should handle the case where the name does not exists without crash.
Pylint version
The text was updated successfully, but these errors were encountered: