uranusjr commented on code in PR #46032:
URL: https://github.com/apache/airflow/pull/46032#discussion_r1938872435
##########
airflow/serialization/serialized_objects.py:
##########
@@ -1792,7 +1792,7 @@ def serialize_task_group(cls, task_group: TaskGroup) ->
dict[str, Any] | None:
if isinstance(task_group, MappedTaskGroup):
expand_input = task_group._expand_input
encoded["expand_input"] = {
- "type": get_map_type_key(expand_input),
+ "type": type(expand_input).EXPAND_INPUT_TYPE,
Review Comment:
```suggestion
"type": expand_input.EXPAND_INPUT_TYPE,
```
##########
airflow/serialization/serialized_objects.py:
##########
@@ -1195,7 +1195,7 @@ def serialize_mapped_operator(cls, op: MappedOperator) ->
dict[str, Any]:
if TYPE_CHECKING: # Let Mypy check the input type for us!
_ExpandInputRef.validate_expand_input_value(expansion_kwargs.value)
serialized_op[op._expand_input_attr] = {
- "type": get_map_type_key(expansion_kwargs),
+ "type": type(expansion_kwargs).EXPAND_INPUT_TYPE,
Review Comment:
```suggestion
"type": expansion_kwargs.EXPAND_INPUT_TYPE,
```
Is the `type` call required? It’s generally not since Python exposes
class-level variables in instances automatically. Not sure if I’m missing some
magic here.
--
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]