Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmayr committed Jul 23, 2024
1 parent 7d29e85 commit f51724e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_marshal_types_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,21 +248,21 @@ class Foo(proto.Message):
def test_struct_nested():
class Foo(proto.Message):
struct_field: struct_pb2.Struct = proto.Field(
proto.MESSAGE,
number=1,
message=struct_pb2.Struct,
)
proto.MESSAGE,
number=1,
message=struct_pb2.Struct,
)

class Bar(proto.Message):
foo_field: Foo = proto.Field(
proto.MESSAGE,
number=1,
message=Foo,
)
proto.MESSAGE,
number=1,
message=Foo,
)

foo = Foo({"struct_field": {"foo": "bagel"}})
assert foo.struct_field == {"foo": "bagel"}

bar = Bar({"foo_field": {"struct_field": {"foo": "cheese"}}})
assert bar.foo_field == Foo({"struct_field": {"foo": "cheese"}})
assert bar.foo_field.struct_field == {"foo": "cheese"}

0 comments on commit f51724e

Please sign in to comment.