This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new b8e44e78b44 Fixing mypy checks for devel-common on main (#53666)
b8e44e78b44 is described below
commit b8e44e78b44715f2c66f8194b690d2348fbd9a0f
Author: Amogh Desai <[email protected]>
AuthorDate: Wed Jul 23 17:29:14 2025 +0530
Fixing mypy checks for devel-common on main (#53666)
* Fixing mypy checks for devel-common on main
* using try except instead
---
devel-common/src/tests_common/test_utils/watcher.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/devel-common/src/tests_common/test_utils/watcher.py
b/devel-common/src/tests_common/test_utils/watcher.py
index 6c6402cc6bd..d8660ab1ddc 100644
--- a/devel-common/src/tests_common/test_utils/watcher.py
+++ b/devel-common/src/tests_common/test_utils/watcher.py
@@ -16,10 +16,14 @@
# under the License.
from __future__ import annotations
-from airflow.decorators import task
from airflow.exceptions import AirflowException
from airflow.utils.trigger_rule import TriggerRule
+try:
+ from airflow.sdk import task
+except ImportError:
+ from airflow.decorators import task # type: ignore[attr-defined,no-redef]
+
@task(trigger_rule=TriggerRule.ONE_FAILED, retries=0)
def watcher():