potiuk commented on code in PR #59087:
URL: https://github.com/apache/airflow/pull/59087#discussion_r2626812999


##########
task-sdk/src/airflow/sdk/bases/decorator.py:
##########
@@ -636,6 +640,28 @@ def __call__(
     def override(self, **kwargs: Any) -> Task[FParams, FReturn]: ...
 
 
+def unwrap_callable(func):
+    from airflow.sdk.bases.decorator import _TaskDecorator
+    from airflow.sdk.definitions.mappedoperator import OperatorPartial
+
+    if isinstance(func, (_TaskDecorator, OperatorPartial)):
+        # unwrap to the real underlying callable
+        return getattr(func, "function", getattr(func, "_func", func))
+    return func
+
+
+def is_async_callable(func):

Review Comment:
   You might take a look at fast-api implementation of the test. They 
implemented it in a bit different way at some point in time, which resulted in 
an issue - but they fixed it later:
   
   See https://github.com/fastapi/fastapi/issues/14444



-- 
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]

Reply via email to