Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Oct 22, 2024
1 parent 7a1e1d0 commit dc33849
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google/api_core/protobuf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def from_any_pb(pb_type, any_pb):
# Unpack the Any object and populate the protobuf message instance.
if not any_pb.Unpack(msg_pb):
raise TypeError(
f"Could not convert `google.protobuf.any_pb2.Any` with underlying type `{any_pb.TypeName()}` to `{msg_pb.DESCRIPTOR.full_name}`"
f"Could not convert `{any_pb.TypeName()}` with underlying type `google.protobuf.any_pb2.Any` to `{msg_pb.DESCRIPTOR.full_name}`"
)

# Done; return the message.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_protobuf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_from_any_pb_failure():
with pytest.raises(
TypeError,
match=re.escape(
"Could not convert `google.protobuf.any_pb2.Any` with underlying type `google.type.Date` to `google.type.TimeOfDay`"
"Could not convert `google.type.Date` with underlying type `google.protobuf.any_pb2.Any` to `google.type.TimeOfDay`"
),
):
protobuf_helpers.from_any_pb(timeofday_pb2.TimeOfDay, in_message)
Expand Down

0 comments on commit dc33849

Please sign in to comment.