Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc33849

Browse files
committed
address review feedback
1 parent 7a1e1d0 commit dc33849

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

google/api_core/protobuf_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def from_any_pb(pb_type, any_pb):
6363
# Unpack the Any object and populate the protobuf message instance.
6464
if not any_pb.Unpack(msg_pb):
6565
raise TypeError(
66-
f"Could not convert `google.protobuf.any_pb2.Any` with underlying type `{any_pb.TypeName()}` to `{msg_pb.DESCRIPTOR.full_name}`"
66+
f"Could not convert `{any_pb.TypeName()}` with underlying type `google.protobuf.any_pb2.Any` to `{msg_pb.DESCRIPTOR.full_name}`"
6767
)
6868

6969
# Done; return the message.

tests/unit/test_protobuf_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_from_any_pb_failure():
6969
with pytest.raises(
7070
TypeError,
7171
match=re.escape(
72-
"Could not convert `google.protobuf.any_pb2.Any` with underlying type `google.type.Date` to `google.type.TimeOfDay`"
72+
"Could not convert `google.type.Date` with underlying type `google.protobuf.any_pb2.Any` to `google.type.TimeOfDay`"
7373
),
7474
):
7575
protobuf_helpers.from_any_pb(timeofday_pb2.TimeOfDay, in_message)

0 commit comments

Comments
 (0)