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
Whenparsingthefollowingfile:
''' Test für menu.py'''importmatplotlib.pyplotaspltimportmenudefmain():
''' Test '''fig=plt.figure()
fig.subplots_adjust(left=0.3)
props=menu.ItemProperties(labelcolor='black', bgcolor='yellow',
fontsize=10, alpha=0.2)
hoverprops=menu.ItemProperties(labelcolor='white', bgcolor='blue',
fontsize=10, alpha=0.2)
menuitems= []
defdummy():
' wie der Name sagt'return'no problem'texts='eins zwei drei vier fünf sechs'.split()
fortextintexts:
item=menu.MenuItem(fig, (text, dummy), props=props, hoverprops=hoverprops,)
menuitems.append(item)
_=menu.Menu(fig, menuitems)
defon_pick(event):
' pick handler'item=event.artistprint(
f'picked {item}'f'\n\t{item.labelstr}'f'\n\t{item.problem()}'
)
cid=fig.canvas.mpl_connect('pick_event', on_pick)
print(f'cid={cid}')
plt.show()
if__name__=='__main__':
main()
pylintcrashedwitha``AstroidError``andwiththefollowingstacktrace:
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 846, in _get_imported_module
return importnode.do_import_module(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
return mymodule.import_module(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 527, in import_module
return AstroidManager().ast_from_module_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 232, in ast_from_module_name
return self.ast_from_file(found_spec.location, modname, fallback=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 124, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 145, in file_build
return self._post_build(module, builder, encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 169, in _post_build
self.delayed_assattr(delayed)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 240, in delayed_assattr
for inferred in node.expr.infer():
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 171, in infer
yield from self._infer(context=context, **kwargs)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 279, in infer_call
yield from callee.infer_call_result(caller=self, context=callcontext)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1733, in infer_call_result
yield from returnnode.value.infer(context)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 270, in infer_call
for callee in self.func.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 279, in infer_call
yield from callee.infer_call_result(caller=self, context=callcontext)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1733, in infer_call_result
yield from returnnode.value.infer(context)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 270, in infer_call
for callee in self.func.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 334, in infer_import_from
module = self.do_import_module()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
return mymodule.import_module(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 527, in import_module
return AstroidManager().ast_from_module_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 232, in ast_from_module_name
return self.ast_from_file(found_spec.location, modname, fallback=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 124, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 144, in file_build
module, builder = self._data_build(data, modname, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 204, in _data_build
module = builder.visit_module(node, modname, node_file, package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/rebuilder.py", line 254, in visit_module
[self.visit(child, newnode) for child in node.body],
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/rebuilder.py", line 603, in visit
visit_method = getattr(self, visit_name)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 798, in _lint_file
check_astroid_module(module)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1067, in check_astroid_module
retval = self._check_astroid_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1117, in _check_astroid_module
walker.walk(node)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 526, in visit_import
imported_module = self._get_imported_module(node, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 871, in _get_imported_module
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 763, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 800, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
Bug description
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 846, in _get_imported_module
return importnode.do_import_module(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
return mymodule.import_module(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 527, in import_module
return AstroidManager().ast_from_module_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 232, in ast_from_module_name
return self.ast_from_file(found_spec.location, modname, fallback=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 124, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 145, in file_build
return self._post_build(module, builder, encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 169, in _post_build
self.delayed_assattr(delayed)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 240, in delayed_assattr
for inferred in node.expr.infer():
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 171, in infer
yield from self._infer(context=context, **kwargs)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 279, in infer_call
yield from callee.infer_call_result(caller=self, context=callcontext)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1733, in infer_call_result
yield from returnnode.value.infer(context)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 270, in infer_call
for callee in self.func.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 358, in infer_attribute
for owner in self.expr.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 279, in infer_call
yield from callee.infer_call_result(caller=self, context=callcontext)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1733, in infer_call_result
yield from returnnode.value.infer(context)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 270, in infer_call
for callee in self.func.infer(context):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/bases.py", line 176, in _infer_stmts
for inf in stmt.infer(context=context): # type: ignore[union-attr]
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/inference.py", line 334, in infer_import_from
module = self.do_import_module()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
return mymodule.import_module(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 527, in import_module
return AstroidManager().ast_from_module_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 232, in ast_from_module_name
return self.ast_from_file(found_spec.location, modname, fallback=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/manager.py", line 124, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 144, in file_build
module, builder = self._data_build(data, modname, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/builder.py", line 204, in _data_build
module = builder.visit_module(node, modname, node_file, package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/rebuilder.py", line 254, in visit_module
[self.visit(child, newnode) for child in node.body],
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/astroid/rebuilder.py", line 603, in visit
visit_method = getattr(self, visit_name)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 798, in _lint_file
check_astroid_module(module)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1067, in check_astroid_module
retval = self._check_astroid_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 1117, in _check_astroid_module
walker.walk(node)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 526, in visit_import
imported_module = self._get_imported_module(node, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/checkers/imports.py", line 871, in _get_imported_module
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 763, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "/Users/mb/miniconda3/envs/py3c/lib/python3.12/site-packages/pylint/lint/pylinter.py", line 800, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
Configuration
No response
Command used
Pylint output
Expected behavior
No crash
Pylint version
OS / Environment
macOS Ventura 13.6.4
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: