Check that airflow module is seen for AIR001#14627
Merged
dhruvmanila merged 1 commit intomainfrom Nov 27, 2024
Merged
Conversation
dhruvmanila
commented
Nov 27, 2024
Comment on lines
-72
to
+77
| .is_some_and(|qualified_name| matches!(qualified_name.segments()[0], "airflow")) | ||
| .is_some_and(|qualified_name| matches!(qualified_name.segments(), ["airflow", ..])) |
Member
Author
There was a problem hiding this comment.
cc @uranusjr is the AIR001 rule valid for any symbols that's being imported from the airflow module? As per the rule documentation, it seems to mention specifically "Airflow Operators", so should this be restricted to airflow.operators.*?
Contributor
There was a problem hiding this comment.
It probably should be restricted to airflow.operators.* and airflow.providers.**.operators.*.
Contributor
|
dhruvmanila
added a commit
that referenced
this pull request
Dec 4, 2024
## Summary This PR makes changes to the `AIR001` rule as per #14627 (comment). Additionally, * Avoid returning the `Diagnostic` and update the checker in the rule logic for consistency * Remove test case for different keyword position (I don't think it's required here) ## Test Plan Add test cases for multiple operators from various modules.
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.
No description provided.