amoghrajesh commented on code in PR #51873:
URL: https://github.com/apache/airflow/pull/51873#discussion_r2176851128


##########
providers/airbyte/src/airflow/providers/airbyte/hooks/airbyte.py:
##########
@@ -26,7 +26,11 @@
 from requests import Session
 
 from airflow.exceptions import AirflowException
-from airflow.hooks.base import BaseHook
+
+try:
+    from airflow.sdk import BaseHook
+except ImportError:
+    from airflow.hooks.base import BaseHook  # type: ignore

Review Comment:
   We will need both `no-redef` and `attr-defined` when using conditionally 
because:
   
   - attr-defined: mypy can’t verify that BaseHook exists in airflow.hooks.base 
at static time.
   - no-redef: assigning to the name BaseHook in both the try and except blocks
   



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to