Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Commit 0fff4e5

Browse files
committed
lint
1 parent fb5f248 commit 0fff4e5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

proto/marshal/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
repeated_composite_types = (containers.RepeatedCompositeFieldContainer,)
4040
repeated_scalar_types = (containers.RepeatedScalarFieldContainer,)
4141
map_composite_types = (containers.MessageMap,)
42-
map_composite_types_str = ('MessageMapContainer')
42+
map_composite_types_str = ("MessageMapContainer",)
4343

4444
if _message:
4545
repeated_composite_types += (_message.RepeatedCompositeContainer,)

proto/marshal/marshal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ def to_python(self, proto_type, value, *, absent: bool = None):
192192
# We need to look up the name of the type in compat.map_composite_types_str
193193
# as class `MessageMapContainer` is no longer exposed
194194
# This is done to avoid taking a breaking change in proto-plus
195-
if value_type in compat.map_composite_types or value_type.__name__ in compat.map_composite_types_str:
195+
if (
196+
value_type in compat.map_composite_types
197+
or value_type.__name__ in compat.map_composite_types_str
198+
):
196199
return MapComposite(value, marshal=self)
197200
return self.get_rule(proto_type=proto_type).to_python(value, absent=absent)
198201

0 commit comments

Comments
 (0)