Skip to content

Commit

Permalink
Fix mypy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tibor-reiss committed Sep 11, 2024
1 parent c3547ea commit 122f97c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions weaviate/collections/cluster/cluster.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down Expand Up @@ -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)

0 comments on commit 122f97c

Please sign in to comment.