potiuk commented on a change in pull request #6601: [AIRFLOW-6010] Remove 
cyclic imports and pylint disables
URL: https://github.com/apache/airflow/pull/6601#discussion_r349799131
 
 

 ##########
 File path: airflow/serialization/serialized_baseoperator.py
 ##########
 @@ -66,34 +66,13 @@ def task_type(self, task_type: str):
     def serialize_operator(cls, op: BaseOperator) -> dict:
         """Serializes operator into a JSON object.
         """
-        serialize_op = {}
-
-        # pylint: disable=protected-access
-        for k in op._serialized_fields:
-            # None is ignored in serialized form and is added back in 
deserialization.
-            v = getattr(op, k, None)
-            if cls._is_excluded(v, k, op):
-                continue
-
-            if k in cls._decorated_fields:
-                serialize_op[k] = cls._serialize(v)
-            else:
-                v = cls._serialize(v)
-                if isinstance(v, dict) and "__type" in v:
-                    v = v["__var"]
-                serialize_op[k] = v
-
-        # Adds a new task_type field to record the original operator class.
-        serialize_op['_task_type'] = op.__class__.__name__
-        serialize_op['_task_module'] = op.__class__.__module__
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to