From 4b2f92e9d1ea4a2c0a06c8f37a74af61fe4aaef9 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Thu, 2 Jul 2026 17:53:36 -0700 Subject: [PATCH] Small ruff fixes --- test/test_serialization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_serialization.py b/test/test_serialization.py index 285edcf..b90715a 100644 --- a/test/test_serialization.py +++ b/test/test_serialization.py @@ -253,6 +253,7 @@ def test_from_bytes_packed_traversal_limit(all_types): for i in range(0, size): assert msg.structList[i].uInt8Field == 0 + def test_malformed_text_field_reraise(): SCHEMA = "@0xdbb9ad1f14bf0b36;\nstruct Person { name @0 :Text; age @1 :UInt32; }\n" with tempfile.NamedTemporaryFile(suffix=".capnp", mode="w", delete=False) as f: @@ -268,6 +269,6 @@ def test_malformed_text_field_reraise(): try: with Person.from_bytes(bytes(buf), traversal_limit_in_words=2**20) as r: _ = str(r.name) - except Exception as e: + except Exception: # Success: We caught an exception cleanly pass