Skip to content

Commit

Permalink
Fix mypy problems in new waeviate client (#40330)
Browse files Browse the repository at this point in the history
The new waeviate client (4.6.5) has more typing information and it
causes Waeviate Hook to fail mypy check. This PR fixes it.

(cherry picked from commit d048122)
  • Loading branch information
potiuk authored and utkarsharma2 committed Jul 3, 2024
1 parent 790c98f commit 77b0c9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/providers/weaviate/hooks/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def get_conn(self) -> WeaviateClient:
additional_headers = extras.pop("additional_headers", {})
scope = extras.get("scope", None) or extras.get("oidc_scope", None)
if api_key:
auth_client_secret = AuthApiKey(api_key)
auth_client_secret: AuthApiKey | AuthBearerToken | AuthClientCredentials | AuthClientPassword = (
AuthApiKey(api_key)
)
elif access_token:
auth_client_secret = AuthBearerToken(
access_token, expires_in=expires_in, refresh_token=refresh_token
Expand Down

0 comments on commit 77b0c9c

Please sign in to comment.