Taragolis commented on code in PR #38348:
URL: https://github.com/apache/airflow/pull/38348#discussion_r1532881799
##########
airflow/providers/cohere/hooks/cohere.py:
##########
@@ -53,7 +53,7 @@ def __init__(
self.max_retries = max_retries
@cached_property
- def get_conn(self) -> cohere.Client:
+ def get_conn(self) -> cohere.Client: # type: ignore[override]
Review Comment:
That not really related to the PR, but issue in general. Changes in cohere
client somehow make `mypy` realise that this breaks types, in BaseHook it is
expected to be a method, but here it defined as property.
We should change in the next major version
/usr/local/lib/python3.8/site-packages/cohere/client.py:60: note: "Client"
defined here
airflow/providers/cohere/hooks/cohere.py:56: error: Signature of "get_conn"
incompatible with supertype "BaseHook" [override]
def get_conn(self) -> cohere.Client:
##########
airflow/providers/cohere/hooks/cohere.py:
##########
@@ -53,7 +53,7 @@ def __init__(
self.max_retries = max_retries
@cached_property
- def get_conn(self) -> cohere.Client:
+ def get_conn(self) -> cohere.Client: # type: ignore[override]
Review Comment:
That not really related to the PR, but issue in general. Changes in cohere
client somehow make `mypy` realise that this breaks types, in BaseHook it is
expected to be a method, but here it defined as property.
We should change in the next major version
```console
/usr/local/lib/python3.8/site-packages/cohere/client.py:60: note: "Client"
defined here
airflow/providers/cohere/hooks/cohere.py:56: error: Signature of "get_conn"
incompatible with supertype "BaseHook" [override]
def get_conn(self) -> cohere.Client:
```
--
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]