Skip to content

Commit 141fd57

Browse files
adamtheturtleclaude
andcommitted
Use assert_never instead of pragma: no cover for exhaustive match
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 61bc5e7 commit 141fd57

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/vws/transports.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""HTTP transport implementations for VWS clients."""
22

33
from collections.abc import Awaitable
4-
from typing import Protocol, Self, runtime_checkable
4+
from typing import Protocol, Self, assert_never, runtime_checkable
55

66
import httpx
77
import requests
@@ -30,9 +30,8 @@ def _httpx_timeout(
3030
write=None,
3131
pool=None,
3232
)
33-
case _: # pragma: no cover
34-
msg = f"Unexpected timeout type: {type(request_timeout)}"
35-
raise TypeError(msg)
33+
case _ as unreachable:
34+
assert_never(unreachable)
3635

3736

3837
@runtime_checkable

0 commit comments

Comments
 (0)