turbaszek edited a comment on pull request #8805: URL: https://github.com/apache/airflow/pull/8805#issuecomment-636329264
> we could let it work when setting _any_ attribute to an XComArg, which would be nice That would mean that if we set 20 attributes in `__init__` then we run `self.set_xcomargs_dependencies` 20 times. This was the reason for the if. But more importanlty `self.set_xcomargs_dependencies` would be called before seeting the value for template field. For example: ```python class DummyOp(BaseOperator): template_fields = ("field",) def __init__(self, field): self.x = 42 # calls self.set_xcomargs_dependencies and fails because selg has no attr fields self.fields = field ``` ---------------------------------------------------------------- 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