-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
area:providersgood first issuekind:metaHigh-level information important to the communityHigh-level information important to the communitykind:taskA task that needs to be completed as part of a larger issueA task that needs to be completed as part of a larger issueprovider:cohere
Description
Body
CohereHook change use property
airflow/airflow/providers/cohere/hooks/cohere.py
Lines 55 to 56 in 9f9ae33
| @cached_property | |
| def get_conn(self) -> cohere.Client: |
Instead of method
Lines 98 to 100 in 9f9ae33
| 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 hereCommitter
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Metadata
Metadata
Assignees
Labels
area:providersgood first issuekind:metaHigh-level information important to the communityHigh-level information important to the communitykind:taskA task that needs to be completed as part of a larger issueA task that needs to be completed as part of a larger issueprovider:cohere