diff --git a/airflow/providers/weaviate/hooks/weaviate.py b/airflow/providers/weaviate/hooks/weaviate.py index b0c8b8793c952..56c7f666330f9 100644 --- a/airflow/providers/weaviate/hooks/weaviate.py +++ b/airflow/providers/weaviate/hooks/weaviate.py @@ -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