uranusjr commented on code in PR #27826:
URL: https://github.com/apache/airflow/pull/27826#discussion_r1030103225


##########
airflow/decorators/base.py:
##########
@@ -300,6 +300,10 @@ def _infer_multiple_outputs(self):
         except TypeError:  # Can't evaluate return type.
             return False
         ttype = getattr(return_type, "__origin__", return_type)
+        if ttype == dict or ttype == Dict:
+            raise AttributeError(
+                "multiple_outputs was not set and will not implicitly unroll 
dict for return values"
+            )

Review Comment:
   AttributeError feels wrong; maybe something like RuntimeError or a custom 
exception class is more suitable. I’d also want the message to be clearer (tell 
the user “set multiple_outputs=True is to retain the old behaviour”).



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