-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[airflow
] Extract AIR312
from AIR302
rules (AIR302
, AIR312
)
#17152
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
Merged
ntBre
merged 12 commits into
astral-sh:main
from
astronomer:extract-suggested-AIR-changes
Apr 9, 2025
Merged
[airflow
] Extract AIR312
from AIR302
rules (AIR302
, AIR312
)
#17152
ntBre
merged 12 commits into
astral-sh:main
from
astronomer:extract-suggested-AIR-changes
Apr 9, 2025
Conversation
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
43d5546
to
d29c78c
Compare
d29c78c
to
32406e9
Compare
06c47b8
to
5b1c7f6
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
AIR312 | 13 | 13 | 0 | 0 | 0 |
AIR302 | 6 | 0 | 6 | 0 | 0 |
ntBre
approved these changes
Apr 8, 2025
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.
Thanks! This looks good to me, just a few minor nits, mostly in the docs.
crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/suggested_to_move_to_provider_in_3.rs
Outdated
Show resolved
Hide resolved
...linter/src/rules/airflow/snapshots/ruff_linter__rules__airflow__tests__AIR312_AIR312.py.snap
Outdated
Show resolved
Hide resolved
Co-authored-by: Brent Westbrook <[email protected]>
Co-authored-by: Brent Westbrook <[email protected]>
Co-authored-by: Brent Westbrook <[email protected]>
Co-authored-by: Brent Westbrook <[email protected]>
a8166e6
to
ab9aeb3
Compare
ntBre
approved these changes
Apr 9, 2025
airflow
] Extract AIR312
from AIR302
rules (AIR302
, AIR312
)
dcreager
added a commit
that referenced
this pull request
Apr 9, 2025
* main: [red-knot] Allow explicit specialization of generic classes (#17023) [`airflow`] Refactor `AIR301` logic and fix typos (`AIR301`) (#17293) [`airflow`] Extract `AIR312` from `AIR302` rules (`AIR302`, `AIR312`) (#17152) [red-knot] Improve handling of visibility constraints in external modules when resolving `*` imports (#17286) [red-knot] Add more tests for `*` imports (#17315)
Glyphack
pushed a commit
to Glyphack/ruff
that referenced
this pull request
Apr 9, 2025
…astral-sh#17152) <!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary <!-- What's the purpose of the change? What does it do, and why? --> As discussed in astral-sh#14626 (comment), we're to separate suggested changes from required changes. The following symbols has been moved to AIR312 from AIR302. They still work in Airflow 3.0, but they're suggested to be changed as they're expected to be removed in future version ```python from airflow.hooks.filesystem import FSHook from airflow.hooks.package_index import PackageIndexHook from airflow.hooks.subprocess import (SubprocessHook, SubprocessResult, working_directory) from airflow.operators.bash import BashOperator from airflow.operators.datetime import BranchDateTimeOperator, target_times_as_dates from airflow.operators.trigger_dagrun import TriggerDagRunLink, TriggerDagRunOperator from airflow.operators.empty import EmptyOperator from airflow.operators.latest_only import LatestOnlyOperator from airflow.operators.python import (BranchPythonOperator, PythonOperator, PythonVirtualenvOperator, ShortCircuitOperator) from airflow.operators.weekday import BranchDayOfWeekOperator from airflow.sensors.date_time import DateTimeSensor, DateTimeSensorAsync from airflow.sensors.external_task import ExternalTaskMarker, ExternalTaskSensor, ExternalTaskSensorLink from airflow.sensors.filesystem import FileSensor from airflow.sensors.time_sensor import TimeSensor, TimeSensorAsync from airflow.sensors.time_delta import TimeDeltaSensor, TimeDeltaSensorAsync, WaitSensor from airflow.sensors.weekday import DayOfWeekSensor from airflow.triggers.external_task import DagStateTrigger, WorkflowTrigger from airflow.triggers.file import FileTrigger from airflow.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger ``` ## Test Plan <!-- How was it tested? --> The test fixture has been updated acccordingly --------- Co-authored-by: Brent Westbrook <[email protected]>
Closed
6 tasks
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.
Summary
As discussed in #14626 (comment), we're to separate suggested changes from required changes.
The following symbols has been moved to AIR312 from AIR302. They still work in Airflow 3.0, but they're suggested to be changed as they're expected to be removed in future version
Test Plan
The test fixture has been updated acccordingly