potiuk commented on issue #27328:
URL: https://github.com/apache/airflow/issues/27328#issuecomment-1386767606

   > Personally I think the eventual goal would be to ban any logic in 
`__init__` for custom operators since all logic should be in `execute` anyway, 
and attribute assignment can be trivially covered by `@dataclasses.dataclass` 
or `@attr.define`. Would that be a viable goal? Maybe we could invest in 
changing most operators to use one of those two, and write a pre-commit hook to 
ban implementing `__init__` in custom operators (with limited exceptions of 
course).
   
   I like this. Though it will take quite some tmie I am afraid - unless we can 
do most of it semi-automatically (which I think might be quite possible).
   


-- 
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]

Reply via email to