Python: Remove getAnArg from DataFlow::CallCfgNode#5253
Merged
Conversation
I've seen quite a few places where `getAnArg` leads to wrong behavior, and I generally just don't like it.
Until we've had further discussion on what is the right approach to naming (internal discussion in github/codeql-python-team#95)
706e80f to
d05a8b8
Compare
tausbn
requested changes
Feb 24, 2021
| /** Gets the data-flow node corresponding to an argument of the call corresponding to this data-flow node */ | ||
| Node getAnArg() { | ||
| /** Gets the data-flow node corresponding to any argument (positional or keyword) of the call corresponding to this data-flow node */ | ||
| Node getAnyArg() { |
Contributor
There was a problem hiding this comment.
I think we should just remove this method until we've reached consensus about its name. Leaving it in means people might start using it, which makes any future renaming awkward.
Member
Author
|
Yep, that's what we agreed, and that's what I just did 👍 (see new force pushed commit) |
tausbn
approved these changes
Feb 24, 2021
Merged
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.
As discussed internally before, the getAnArg name clashes with the functionality in
Function: github/codeql-python-team#95 (and our normal pattern of when providinggetFoo(index i), then also providinggetAFoo() { result = this.getFoo(_) })Follow up to #5251