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 8b6ab5a392 replace = by is for type comparaison (#33983)
8b6ab5a392 is described below

commit 8b6ab5a392f816c19ed48d24621a5390059d1109
Author: Hussein Awala <[email protected]>
AuthorDate: Mon Sep 11 20:20:13 2023 +0200

    replace = by is for type comparaison (#33983)
---
 airflow/decorators/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/decorators/base.py b/airflow/decorators/base.py
index 939b65b876..37a8563431 100644
--- a/airflow/decorators/base.py
+++ b/airflow/decorators/base.py
@@ -351,7 +351,7 @@ class _TaskDecorator(ExpandableFactory, Generic[FParams, 
FReturn, OperatorSubcla
         except TypeError:  # Can't evaluate return type.
             return False
         ttype = getattr(return_type, "__origin__", return_type)
-        return ttype == dict or ttype == Dict
+        return ttype is dict or ttype is Dict
 
     def __attrs_post_init__(self):
         if "self" in self.function_signature.parameters:

Reply via email to