ephraimbuddy commented on code in PR #54505:
URL: https://github.com/apache/airflow/pull/54505#discussion_r2472734184
##########
airflow-core/src/airflow/exceptions.py:
##########
@@ -21,29 +21,26 @@
from __future__ import annotations
-from collections.abc import Collection, Sequence
-from datetime import datetime, timedelta
from http import HTTPStatus
-from typing import TYPE_CHECKING, Any, NamedTuple
+from typing import TYPE_CHECKING, NamedTuple
if TYPE_CHECKING:
from airflow.models import DagRun
- from airflow.sdk.definitions.asset import AssetNameRef, AssetUniqueKey,
AssetUriRef
- from airflow.utils.state import DagRunState
+try:
+ from airflow.sdk.exceptions import AirflowException
+except ModuleNotFoundError:
+ # The shared libraries are unable to see the 'sdk' package, so redefine
here
+ class AirflowException(Exception): # type: ignore[no-redef]
+ """Base class for all Airflow exceptions."""
Review Comment:
```suggestion
from airflow.sdk.exceptions import AirflowException
```
--
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]