From f5fa125862c49c9d8f015d88fd1a43c9ec31e7ca Mon Sep 17 00:00:00 2001 From: Benedikt Bartscher Date: Sun, 16 Nov 2025 11:10:30 +0100 Subject: [PATCH] showcase broken case without explicit type in oneof pattern matching --- betterproto2/tests/oneof_pattern_matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/betterproto2/tests/oneof_pattern_matching.py b/betterproto2/tests/oneof_pattern_matching.py index e7d3e591..fef8fd0b 100644 --- a/betterproto2/tests/oneof_pattern_matching.py +++ b/betterproto2/tests/oneof_pattern_matching.py @@ -7,7 +7,7 @@ def test_oneof_pattern_matching(): msg = OneofMsg(y="test1", b="test2") match msg: - case OneofMsg(x=int(_)): + case OneofMsg(x=_): pytest.fail("Matched 'bar' instead of 'baz'") case OneofMsg(y=v): assert v == "test1"