Skip to content

Commit a4a2914

Browse files
samples: Update schema.py print (#949)
Format string issue Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-pubsub/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
1 parent 9a0bb61 commit a4a2914

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/google-cloud-pubsub/samples/snippets

packages/google-cloud-pubsub/samples/snippets/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def callback(message: pubsub_v1.subscriber.message.Message) -> None:
727727
# Deserialize the message data accordingly.
728728
if encoding == "BINARY":
729729
state.ParseFromString(message.data)
730-
print("Received a binary-encoded message:\n{state}")
730+
print(f"Received a binary-encoded message:\n{state}")
731731
elif encoding == "JSON":
732732
Parse(message.data, state)
733733
print(f"Received a JSON-encoded message:\n{state}")

0 commit comments

Comments
 (0)