noamcohen97 commented on code in PR #36652:
URL: https://github.com/apache/airflow/pull/36652#discussion_r1444224759


##########
airflow/decorators/base.py:
##########
@@ -351,7 +351,7 @@ def fake():
         except TypeError:  # Can't evaluate return type.
             return False
         ttype = getattr(return_type, "__origin__", return_type)
-        return ttype is dict or ttype is Dict
+        return issubclass(ttype, Dict)

Review Comment:
   I agree, `typing.Mapping` is more suitable. I did not want to change the 
code drastically,
   and since we are comparing types here, and not instances, we should still 
use `issubclass()` and not `isinstance()`.



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