Skip to content

Commit f9fbb43

Browse files
authored
fix: SyntaxWarning for 'return' in a 'finally' block on Python 3.14 (#587)
1 parent 2a646ce commit f9fbb43

File tree

1 file changed

+2
-4
lines changed
  • packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private

1 file changed

+2
-4
lines changed

packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private/serializers.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ def begin_struct(self, schema: "Schema") -> Iterator[ShapeSerializer]:
5959
# Note that if we're serializing an operation input or output, it won't be a
6060
# union at all, so this won't get triggered. Thankfully, that's what we want.
6161
if schema.shape_type is ShapeType.UNION:
62-
try:
63-
yield self
64-
finally:
65-
return
62+
yield self
63+
return
6664

6765
headers: dict[str, HEADER_VALUE] = {}
6866

0 commit comments

Comments
 (0)