Skip to content

Commit 17e2955

Browse files
committed
chore: help type checker
1 parent 5e2ae4f commit 17e2955

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/firebolt/client/http_backend.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def get_ip_round_robin(self, hostname: str) -> str:
5858
if not cached_ips:
5959
raise
6060

61+
# explicit check as hint for type checkers
62+
if not cached_ips:
63+
raise RuntimeError(f"Could not resolve or find cached IPs for {hostname}")
64+
6165
# calculate round robin index
6266
current_index = self.indices.get(hostname, 0)
6367
target_ip = cached_ips[current_index % len(cached_ips)]

0 commit comments

Comments
 (0)