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
"test pylint"
from flask_sqlalchemy import SQLAlchemy
z = SQLAlchemy()
pylint crashed with a AstroidError and with the following stacktrace:
Traceback (most recent call last):
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/checkers/utils.py", line 1390, in safe_infer
value = next(infer_gen)
^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/nodes/node_ng.py", line 171, in infer
yield from self._infer(context=context, **kwargs)
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 143, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 112, in wrapped
for res in _func(node, context, **kwargs):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/bases.py", line 177, in _infer_stmts
for inf in stmt.infer(context=context):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 143, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 112, in wrapped
for res in _func(node, context, **kwargs):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/bases.py", line 177, in _infer_stmts
for inf in stmt.infer(context=context):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/nodes/node_ng.py", line 184, in infer
for i, result in enumerate(self._infer(context=context, **kwargs)):
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 143, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/decorators.py", line 112, in wrapped
for res in _func(node, context, **kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/inference.py", line 334, in infer_import_from
module = self.do_import_module()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/nodes/_base_nodes.py", line 146, in do_import_module
return mymodule.import_module(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 530, in import_module
return AstroidManager().ast_from_module_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/manager.py", line 246, in ast_from_module_name
return self.ast_from_file(found_spec.location, modname, fallback=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/manager.py", line 138, in ast_from_file
return AstroidBuilder(self).file_build(filepath, modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/builder.py", line 145, in file_build
return self._post_build(module, builder, encoding)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/builder.py", line 173, in _post_build
module = self._manager.visit_transforms(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/manager.py", line 109, in visit_transforms
return self._transform.visit(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 89, in visit
return self._visit(module)
^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 54, in _visit
visited = self._visit_generic(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 61, in _visit_generic
return [self._visit_generic(child) for child in node]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 61, in <listcomp>
return [self._visit_generic(child) for child in node]
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 67, in _visit_generic
return self._visit(node)
^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 57, in _visit
return self._transform(node)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/astroid/transforms.py", line 39, in _transform
ret = transform_func(node)
^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint_flask_sqlalchemy/__init__.py", line 23, in transform
for key in module.__all__:
^^^^^^^^^^^^^^
AttributeError: module 'sqlalchemy' has no attribute '__all__'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 811, in _lint_file
check_astroid_module(module)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 1085, in check_astroid_module
retval = self._check_astroid_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 1135, in _check_astroid_module
walker.walk(node)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 94, in walk
self.walk(child)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 1528, in visit_assign
self._append_context_managers_to_stack(node)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/checkers/refactoring/refactoring_checker.py", line 1583, in _append_context_managers_to_stack
inferred = utils.safe_infer(value.func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/checkers/utils.py", line 1394, in safe_infer
raise AstroidError from e
astroid.exceptions.AstroidError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 775, in _lint_files
self._lint_file(fileitem, module, check_astroid_module)
File "/opt/scodoc/venv/lib/python3.11/site-packages/pylint/lint/pylinter.py", line 813, in _lint_file
raise astroid.AstroidError from e
astroid.exceptions.AstroidError
The text was updated successfully, but these errors were encountered:
Using versions:
pylint-flask 0.6
pylint-flask-sqlalchemy 0.2.0
pylint-plugin-utils 0.8.2
SQLAlchemy 2.0.19
When parsing the following file:
pylint crashed with a AstroidError and with the following stacktrace:
The text was updated successfully, but these errors were encountered: