-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError
: 'Module' object has no attribute 'doc_node'
#2683
Comments
## Changes Catch `AttributeError` in `InfferedValue._safe_infer_internal` to make the inference safer. It is a bug in Astroid pylint-dev/astroid#2683 ### Linked issues Resolves #3659 ### Functionality - [x] strengthen source code linting code, specifically value inference
Do you know how the |
Hi @DanielNoord , I do not have the source code, maybe @pamons-databricks can provide that. We use |
Is it possible that something is not calling >>> astroid.scoped_nodes.Module("a").doc_node
Traceback (most recent call last):
File "<python-input-6>", line 1, in <module>
astroid.scoped_nodes.Module("a").doc_node
AttributeError: 'Module' object has no attribute 'doc_node' astroid/astroid/nodes/scoped_nodes/scoped_nodes.py Lines 277 to 281 in 7318c43
I checked the flow of |
TBH, I am not 100% if we use the I am confident that all Python source code is converted to a node using But, I also see we use the Fyi: Both the custom node classes and the |
Are you making |
The failing workflow has a single Python Script task which calls a python file in a workspace location The workflow has never been run either |
We do that here to create "root" modules to attach trees to |
@JCZuurmond You should definitely call |
Astroid tries to get the
doc_node
onModule
object while it does not exists. A safer implementation gets the attribute only when it exists, otherwise getsNone
.Originally raise on databrickslabs/ucx#3659
The text was updated successfully, but these errors were encountered: