Body
CohereHook change use property
|
@cached_property |
|
def get_conn(self) -> cohere.Client: |
Instead of method
|
def get_conn(self) -> Any: |
|
"""Return connection for the hook.""" |
|
raise NotImplementedError() |
Should be changed into the next major version.
For save caching it might be changed to something like (just for a reference)
class CohereHook(BaseHook):
...
def get_conn(self) -> client.Cohere:
"""Some useful docstring"""
return self.client
@cached_property
def get_conn(self) -> client.Cohere:
"""Some useful docstring"""
... # Some implementation for obtain client here
Committer
Body
CohereHookchange use propertyairflow/airflow/providers/cohere/hooks/cohere.py
Lines 55 to 56 in 9f9ae33
Instead of method
airflow/airflow/hooks/base.py
Lines 98 to 100 in 9f9ae33
Should be changed into the next major version.
For save caching it might be changed to something like (just for a reference)
Committer