-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add AIR301 rule #17707
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
Add AIR301 rule #17707
Conversation
|
cc: @Lee-W |
|
Lee-W
left a comment
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.
This is not in Airflow 3.0.0 but is expected to be released in 3.0.1. @ntBre is there any suggestion on this case? Should we create a new error? Thanks!
|
I think if you want people to be able to enable this separately from the other 3.0 rules, a separate rule would be required. Alternatively, we could hold off on adding this until 3.0.1 is released, if that would work for you all. Which part is not in 3.0.0? If the replacement is available but the old version isn't deleted, I think it could make sense just to enable the rule anyway, but that obviously wouldn't make sense if the replacement is only added in 3.0.1. I'll go ahead and review but hold off merging in case you want a separate rule. |
|
I think I'd prefer to keep it in the same rule, you could update the diagnostic message for the existing rules to make it explicit that this "requires Airflow 3.0 or greater". It also seems to be something that's part of a patch version in Airflow so I'm assuming that it's backwards compatible and as Ruff can't detect the dependency version it makes sense that Ruff assumes that users are on the latest version of Airflow 3. I think it's the same for NumPy 2.0 deprecation rules if I'm not mistaken. |
Yep, I think we should hold off till 3.0.1
The replacement itself. It will be introduced in 3.0.1
Yep, I was thinking of something similar. Cool! I'll go with this route after 3.0.1 release. Thanks! |
|
I'll mark this as a draft until we're ready to merge, which sounds like after 3.0.1 is released. Feel free to ping me whenever it's ready! |
|
@Lee-W what's the status on this rule? Can we close this PR? |
|
Hey, sorry for the late reply. I'll take a look tomorrow |
|
I think this is needed and I'll take over once I'm back from my vacaction |
|
Enjoy your vacation |
6121cb3 to
18bb40f
Compare
|
The PR is now ready, but I'm not allowed to change anything other than code somehow 🤔 |
ntBre
left a comment
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.
Still looks good to me, thank you! I think you'll just need to resolve the conflicts and then we can merge.
* main: (31 commits) Add AIR301 rule (#17707) Avoid underflow in default ranges before a BOM (#19839) Update actions/download-artifact digest to de96f46 (#19852) Update docker/login-action action to v3.5.0 (#19860) Update rui314/setup-mold digest to 7344740 (#19853) Update cargo-bins/cargo-binstall action to v1.14.4 (#19855) Update actions/cache action to v4.2.4 (#19854) Update Rust crate hashbrown to v0.15.5 (#19858) Update Rust crate camino to v1.1.11 (#19857) Update Rust crate proc-macro2 to v1.0.96 (#19859) Update dependency ruff to v0.12.8 (#19856) SIM905: Fix handling of U+001C..U+001F whitespace (#19849) RUF064: offer a safe fix for multi-digit zeros (#19847) Clean up unused rendering code in `ruff_linter` (#19832) [ty] Add Salsa caching to `TupleType::to_class_type` (#19840) [ty] Handle cycles when finding implicit attributes (#19833) [ty] fix goto-definition on imports (#19834) [ty] Implement stdlib stub mapping (#19529) [`flake8-comprehensions`] Fix false positive for `C420` with attribute, subscript, or slice assignment targets (#19513) [ty] Implement module-level `__getattr__` support (#19791) ...
* dcreager/bound-typevar: (41 commits) [ty] Use separate Rust types for bound and unbound type variables (#19796) fix ide tests better unbound typevar rendering Apply suggestions from code review [ty] Add `static-frame` as a walltime benchmark (#19844) add explanatory comment [ty] Update goto range for attribute access to only target the attribute (#19848) remove unneeded ord add TODO for broken hover test better PEP 695 binding context Add AIR301 rule (#17707) Avoid underflow in default ranges before a BOM (#19839) Update actions/download-artifact digest to de96f46 (#19852) Update docker/login-action action to v3.5.0 (#19860) Update rui314/setup-mold digest to 7344740 (#19853) Update cargo-bins/cargo-binstall action to v1.14.4 (#19855) Update actions/cache action to v4.2.4 (#19854) Update Rust crate hashbrown to v0.15.5 (#19858) Update Rust crate camino to v1.1.11 (#19857) Update Rust crate proc-macro2 to v1.0.96 (#19859) ...
Summary
Add "airflow.secrets.cache.SecretCache" → "airflow.sdk.cache.SecretCache" rule
Test Plan