Skip to content

Commit

Permalink
feat(AIR302-name): "airflow.operators.subdag.*" was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Dec 6, 2024
1 parent bb1341b commit e9a2a55
Show file tree
Hide file tree
Showing 3 changed files with 190 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from airflow.contrib.aws_athena_hook import AWSAthenaHook
from airflow.metrics.validators import AllowListValidator
from airflow.metrics.validators import BlockListValidator
from airflow.operators.subdag import SubDagOperator
from airflow.secrets.local_filesystem import get_connection, load_connections
from airflow.utils import dates
from airflow.utils.dates import (
Expand Down Expand Up @@ -40,6 +41,8 @@
AllowListValidator
BlockListValidator

SubDagOperator

dates.date_range
dates.days_ago

Expand Down
4 changes: 4 additions & 0 deletions crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ fn removed_name(checker: &mut Checker, expr: &Expr, ranged: impl Ranged) {
"airflow.metrics.validators.PatternBlockListValidator".to_string(),
),
)),
// airflow.operators
["airflow", "operators", "subdag", ..] => {
Some((qualname.to_string(), Replacement::None))
}
// airflow.secrets
["airflow", "secrets", "local_filesystem", "load_connections"] => Some((
qualname.to_string(),
Expand Down
Loading

0 comments on commit e9a2a55

Please sign in to comment.