sjyangkevin commented on issue #52962: URL: https://github.com/apache/airflow/issues/52962#issuecomment-3764708935
`BaseOperator` will be handled in this PR https://github.com/astral-sh/ruff/pull/22376, which is currently under review and discussed in the https://github.com/apache/airflow/issues/54714. In AIR301, `BaseHook` in ruff is moved under [`airflow.hooks.base`](https://github.com/astral-sh/ruff/blob/ac8c85eb8c56c0ae6eb6fe8a79f719f392f07f4a/crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs#L672-L676). It is a valid import when testing in breeze. ```bash breeze shell --use-airflow-version 3.0.6 --db-reset --python 3.12 --backend postgres ``` <img width="578" height="197" alt="Image" src="https://github.com/user-attachments/assets/1d294caa-eb02-4150-8b54-089f82aab71f" /> In Airflow 3.1.6, there is a deprecation warning for import from `airflow.hooks.base`. ```bash breeze shell --use-airflow-version 3.1.6 --db-reset --python 3.12 --backend postgres ``` <img width="1171" height="207" alt="Image" src="https://github.com/user-attachments/assets/4414d8e8-9ea2-4ba6-84cb-07aea8bf8a04" /> We should probably also add this rule into the new code AIR321. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
