Skip to content

Commit

Permalink
feat(AIR302): airflow.hooks.base_hook.BaseHook → airflow.hooks.base.B…
Browse files Browse the repository at this point in the history
…aseHook
  • Loading branch information
Lee-W committed Dec 27, 2024
1 parent 0fe1c05 commit 3b8461f
Show file tree
Hide file tree
Showing 3 changed files with 540 additions and 521 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
dataset_manager,
resolve_dataset_manager,
)
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
Expand Down Expand Up @@ -138,6 +139,9 @@
# airflow.datasets.manager
DatasetManager, dataset_manager, resolve_dataset_manager

# airflow.hooks
BaseHook()

# airflow.lineage.hook
DatasetLineageInfo

Expand Down
5 changes: 5 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 @@ -592,6 +592,11 @@ fn removed_name(checker: &mut Checker, expr: &Expr, ranged: impl Ranged) {
qualname.to_string(),
Replacement::Name("airflow.lineage.hook.AssetLineageInfo"),
)),
// airflow.hooks
["airflow", "hooks", "base_hook", "BaseHook"] => Some((
qualname.to_string(),
Replacement::Name("airflow.hooks.base.BaseHook"),
)),
// airflow.operators
["airflow", "operators", "subdag", ..] => {
Some((
Expand Down
Loading

0 comments on commit 3b8461f

Please sign in to comment.