hussein-awala commented on PR #35989:
URL: https://github.com/apache/airflow/pull/35989#issuecomment-1834622225

   Currently, hook is a standard method, so if someone extends the trigger, he 
should use:
   ```python
   self.hook()
   ```
   If we convert it to a cached_property, `self.hook` will return the hook, and 
the `()` will be applied on its value. A simple example:
   ```python
   >>> from functools import cached_property
   >>> class X:
   ...     @cached_property
   ...     def x(self):
   ...             return 1
   ... 
   >>> X().x()
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: 'int' object is not callable
   ```


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