Skip to content

Commit b4cfed0

Browse files
adamtheturtleclaude
andcommitted
Use wildcard case for body to preserve original fallthrough behavior
The original else branch handled any type, not just bytes(). Using case _ preserves that catch-all semantics. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 371555a commit b4cfed0

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
@@ -184,8 +184,8 @@ def wrapped(
184184
body_bytes = b""
185185
case str() as raw_body:
186186
body_bytes = raw_body.encode(encoding="utf-8")
187-
case bytes() as raw_body:
188-
body_bytes = raw_body
187+
case _:
188+
body_bytes = request.body
189189

190190
path = request.path_url
191191
if base_path and path.startswith(base_path):

0 commit comments

Comments
 (0)