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.
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
[
airflow
] UpdateAIR302
to check for deprecated context keys #15144[
airflow
] UpdateAIR302
to check for deprecated context keys #15144Changes from 1 commit
cba3116
3687e79
7252947
e458197
fe78c5b
1cb1026
00ee37d
9c14a12
fa58ee0
e79162e
035f982
d96f362
c2e6cb2
3848355
889c685
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can use 0 as the default value here. What would happen if it's a positional parameter which is expected to be at position 1 or 2? This will return incorrect argument.
I think we should also add test cases where there are multiple arguments that are deprecated in the same function intermixed with non-deprecated arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I am also doing a check
if let Expr::StringLiteral(ExprStringLiteral { value, .. }) = argument
here as well.I have added the test cases for multiple arguments that are deprecated in the same function intermixed with non-deprecated arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, this is for the call expression. I think I confused this with the function parameter check.
Does
context.get
allow keyword argument? Thefind_arguments_value
will first check if there's a keyword with the given name (as indicated byremoved_key
variable in this case) and then check for positional argument. I'm assuming thatcontext.get(conf="conf")
is not allowed and onlycontext.get("conf")
is allowed which is why I think we should directly usefind_positional
instead.(I've marked this as unresolved to make sure I don't forget to check this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can only do
context.get("conf")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
find_positional
directly.