Python: Deprecate importNode#6312
Merged
Merged
Conversation
Unsurprisingly, the only thing affected by this was the `import-helper` tests. These have lost all of the results relating to `ImportMember`s, but apart from that the underlying behaviour should be the same. I also limited the test to only `CfgNode`s, as a bunch of `EssaNode`s suddenly appeared when I switched to API graphs. Finally, I used `API::moduleImport` with a dotted name in the type tracking tests. This goes against the API graphs interface, but I think it's more correct for this use case, as these type trackers are doing the "module attribute lookup" bit manually.
RasmusWL
reviewed
Jul 19, 2021
Member
RasmusWL
left a comment
There was a problem hiding this comment.
change looks good to me overall 👍
I'm not too sure whether the import-helper tests adds any value now though. As far as I can tell, we have all these tests files in ql/test/experimental/dataflow/ApiGraphs/test5.py (with nice annotations). So I would suggest we just delete these import-helper tests. (although I certainly don't want us to delete the last copy of these carefully constructed tests).
As discussed, these are all present in the `ApiGraphs` directory already (except for the dataflow consistency test, which has been moved there instead).
RasmusWL
approved these changes
Sep 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unsurprisingly, the only thing affected by this was the
import-helpertests. These have lost all of the results relating to
ImportMembers,but apart from that the underlying behaviour should be the same.
I also limited the test to only
CfgNodes, as a bunch ofEssaNodessuddenly appeared when I switched to API graphs.
Finally, I used
API::moduleImportwith a dotted name in the typetracking tests. This goes against the API graphs interface, but I think
it's more correct for this use case, as these type trackers are doing
the "module attribute lookup" bit manually.