Skip to content

Commit

Permalink
fix(pool): cast supporting 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Dec 18, 2023
1 parent a26cfa4 commit fb529bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mafic/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ def get_random_node(cls) -> Node[ClientT]:
If there are no nodes.
"""
# It is a classproperty.
nodes = cast(list[Node[ClientT]], cls.nodes) # pyright: ignore # noqa: PGH003
nodes = cast(
"list[Node[ClientT]]", cls.nodes # pyright: ignore # noqa: PGH003
)

if node := choice(nodes):
return node
Expand Down

0 comments on commit fb529bf

Please sign in to comment.