Skip to content

Commit f94ea02

Browse files
potiukutkarsharma2
authored andcommitted
Fix mypy problems in new waeviate client (#40330)
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)
1 parent 40abcc2 commit f94ea02

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

airflow/providers/weaviate/hooks/weaviate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def get_conn(self) -> WeaviateClient:
120120
additional_headers = extras.pop("additional_headers", {})
121121
scope = extras.get("scope", None) or extras.get("oidc_scope", None)
122122
if api_key:
123-
auth_client_secret = AuthApiKey(api_key)
123+
auth_client_secret: AuthApiKey | AuthBearerToken | AuthClientCredentials | AuthClientPassword = (
124+
AuthApiKey(api_key)
125+
)
124126
elif access_token:
125127
auth_client_secret = AuthBearerToken(
126128
access_token, expires_in=expires_in, refresh_token=refresh_token

0 commit comments

Comments
 (0)