mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:23:11 +00:00
[airflow
] Add chain
, chain_linear
and cross_downstream
for AIR302
(#16647)
## Summary Similar to https://github.com/astral-sh/ruff/pull/16014. PR on Airflow side: https://github.com/apache/airflow/pull/47639 ## Test Plan A test fixture has been updated
This commit is contained in:
parent
4d3a5afea5
commit
b7d232cf89
3 changed files with 505 additions and 497 deletions
|
@ -44,6 +44,7 @@ from airflow.hooks.base_hook import BaseHook
|
|||
from airflow.lineage.hook import DatasetLineageInfo
|
||||
from airflow.listeners.spec.dataset import on_dataset_changed, on_dataset_created
|
||||
from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
from airflow.models.baseoperator import chain, chain_linear, cross_downstream
|
||||
from airflow.operators import dummy_operator
|
||||
from airflow.operators.branch_operator import BaseBranchOperator
|
||||
from airflow.operators.dagrun_operator import TriggerDagRunLink, TriggerDagRunOperator
|
||||
|
|
|
@ -751,11 +751,18 @@ fn check_name(checker: &Checker, expr: &Expr, range: TextRange) {
|
|||
}
|
||||
|
||||
// airflow.utils.helpers
|
||||
["airflow", "utils", "helpers", "chain"] => {
|
||||
Replacement::Name("airflow.models.baseoperator.chain")
|
||||
}
|
||||
["airflow", "utils", "helpers", "chain"] => Replacement::Name("airflow.sdk.chain"),
|
||||
["airflow", "utils", "helpers", "cross_downstream"] => {
|
||||
Replacement::Name("airflow.models.baseoperator.cross_downstream")
|
||||
Replacement::Name("airflow.sdk.cross_downstream")
|
||||
}
|
||||
|
||||
// airflow.models.baseoperator
|
||||
["airflow", "models", "baseoperator", "chain"] => Replacement::Name("airflow.sdk.chain"),
|
||||
["airflow", "models", "baseoperator", "chain_linear"] => {
|
||||
Replacement::Name("airflow.sdk.chain_linear")
|
||||
}
|
||||
["airflow", "models", "baseoperator", "cross_downstream"] => {
|
||||
Replacement::Name("airflow.sdk.cross_downstream")
|
||||
}
|
||||
|
||||
// airflow.utils.state
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue