This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Function to resolve references #90
Labels
Comments
lars-reimann
added
enhancement 💡
New feature or request
purity
Inferring the purity of functions
labels
Apr 6, 2023
7 tasks
Merged
github-project-automation
bot
moved this from In Progress
to ✔️ Done
in Library Analysis
Jun 22, 2023
This issue is still in progress, so it should not be closed yet. |
lars-reimann
pushed a commit
that referenced
this issue
Oct 2, 2023
Closes #90 ### Summary of Changes This feature contains many additions to the collection of data when parsing python code (former scope detection). We now collect: the scope, the classes, the functions, all global variables, all value and target nodes, the parameters as well as all function calls when traversing the AST. During this traversal, we also determine the symbols for all name nodes. We distinguish between `GlobalVariables, LocalVariables, ClassVariables, InstanceVariables, Parameters` and `Builtins`. Furthermore, this feature resolves the references for all name nodes (target and value nodes). For each name node we determine its scope, as mentioned above, and a list of all referenced symbols and return a `ReferenceNode`. <!-- Please provide a summary of changes in this pull request, ensuring all changes are explained. --> --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
github-project-automation
bot
moved this from In Progress
to ✔️ Done
in Library Analysis
Oct 2, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem?
As a basis for the data flow analysis we need to know the declaration(s) that a reference can point to.
Desired solution
A function
resolve_reference
that takes anastroid.Name
node (or another node that represents a reference) and returns a list of the possiblethat the reference can point to.
If we cannot list all candidates, this should be clearly indicated. Since this function is the basis for any further analysis, it should be well tested.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
The text was updated successfully, but these errors were encountered: