-
-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Description
Steps to reproduce
The following code triggers a KeyError in astroid:
dict.fromkeys.__doc__.c=pThis bug was discovered by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62324 (report not public yet)
Current behavior
Traceback (most recent call last):
File "pylint/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "pylint/pylint/checkers/classes/class_checker.py", line 1739, in visit_assignattr
self._check_in_slots(node)
File "pylint/pylint/checkers/classes/class_checker.py", line 1774, in _check_in_slots
inferred = safe_infer(node.expr)
^^^^^^^^^^^^^^^^^^^^^
File "pylint/pylint/checkers/utils.py", line 1372, in safe_infer
inferred_types.add(_get_python_type_of_node(value))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "pylint/pylint/checkers/utils.py", line 1339, in _get_python_type_of_node
return pytype()
^^^^^^^^
File "astroid/astroid/nodes/node_classes.py", line 2159, in pytype
return self._proxied.qname()
^^^^^^^^^^^^^
File "astroid/astroid/raw_building.py", line 596, in _set_proxied
return _CONST_PROXY[const.value.__class__]
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
KeyError: <class 'getset_descriptor'>
Expected behavior
No crash
Version
Reactions are currently unavailable