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
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 an astroid.Name node (or another node that represents a reference) and returns a list of the possible
parameters
local variables
global variables
class attributes
instance attributes
that 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:
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 <[email protected]>
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: