Skip to content

Commit 3d57724

Browse files
adamtheturtleclaude
andcommitted
Handle (connect, None) timeout tuples correctly
Match only int/float read values in the tuple case, so (5, None) falls through to effective = None instead of raising TypeError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b4cfed0 commit 3d57724

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mock_vws/_requests_mock_server/decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ def wrapped(
168168
# tuple. The delay simulates server response
169169
# time, so compare against the read timeout.
170170
match timeout:
171-
case tuple():
172-
effective: float | None = float(timeout[1])
171+
case (_, int() | float() as read_timeout):
172+
effective: float | None = float(read_timeout)
173173
case int() | float():
174174
effective = float(timeout)
175175
case _:

0 commit comments

Comments
 (0)