josh-fell commented on a change in pull request #19608:
URL: https://github.com/apache/airflow/pull/19608#discussion_r749875559



##########
File path: airflow/decorators/base.py
##########
@@ -202,7 +202,16 @@ def task_decorator_factory(
     # try to infer from  type annotation
     if python_callable and multiple_outputs is None:
         sig = signature(python_callable).return_annotation
-        ttype = getattr(sig, "__origin__", None)
+
+        # If the return type annotation is already the builtins ``dict`` type, 
use it for the inference.
+        if sig == dict:
+            ttype = sig

Review comment:
       I updated the unit tests for some different flavors of typing too if it 
helps.




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