ephraimbuddy commented on code in PR #32027:
URL: https://github.com/apache/airflow/pull/32027#discussion_r1236582122
##########
airflow/models/xcom_arg.py:
##########
@@ -370,6 +370,13 @@ def resolve(self, context: Context, session: Session =
NEW_SESSION) -> Any:
return result
if self.key == XCOM_RETURN_KEY:
return None
+ if self.operator.multiple_outputs: # type: ignore
Review Comment:
The operator typing is Operator which is a union of BaseOperator and
MappedOperator but the type that get's there when using @task is
_PythonDecoratedOperator. Might need to have a union of Operator and
PythonDecoratedOperator as the type but I didn't look deeper
```
Run mypy for
core..................................................................Failed
- hook id: mypy-core
- exit code: 1
WARNING: The requested image's platform (linux/amd64) does not match the
detected host platform (linux/arm64/v8) and no specific platform was requested
airflow/models/xcom_arg.py:373: error: Item "BaseOperator" of
"Union[BaseOperator, MappedOperator]" has no attribute "multiple_outputs"
[union-attr]
if self.operator.multiple_outputs:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
airflow/models/xcom_arg.py:373: error: Item "MappedOperator" of
"Union[BaseOperator, MappedOperator]" has no attribute "multiple_outputs"
[union-attr]
if self.operator.multiple_outputs:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
--
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]