From 122f97cdf9df94f163f56b187220046ebc85d64b Mon Sep 17 00:00:00 2001 From: Tibor Reiss Date: Tue, 27 Aug 2024 20:27:00 +0200 Subject: [PATCH] Fix mypy issue --- weaviate/collections/cluster/cluster.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/weaviate/collections/cluster/cluster.py b/weaviate/collections/cluster/cluster.py index 1b900fbe4..1662bdf99 100644 --- a/weaviate/collections/cluster/cluster.py +++ b/weaviate/collections/cluster/cluster.py @@ -1,14 +1,11 @@ -from weaviate.connect import ConnectionV4 - - -from typing import List, Literal, Optional, Union, overload +from typing import List, Literal, Optional, Union, cast, overload from weaviate.cluster.types import Node as NodeREST from weaviate.collections.classes.cluster import Node, Shards, _ConvertFromREST, Stats +from weaviate.connect import ConnectionV4 from weaviate.exceptions import ( EmptyResponseError, ) - from weaviate.util import _capitalize_first_letter, _decode_json_response_dict @@ -98,4 +95,4 @@ async def rest_nodes( nodes = response_typed.get("nodes") if nodes is None or nodes == []: raise EmptyResponseError("Nodes status response returned empty") - return nodes + return cast(List[NodeREST], nodes)