Skip to content

Commit

Permalink
samples: Update schema.py print (#949)
Browse files Browse the repository at this point in the history
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> 🦕
  • Loading branch information
chak-radhar007 authored Jul 22, 2023
1 parent 9187267 commit 0f260e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/snippets/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def callback(message: pubsub_v1.subscriber.message.Message) -> None:
# Deserialize the message data accordingly.
if encoding == "BINARY":
state.ParseFromString(message.data)
print("Received a binary-encoded message:\n{state}")
print(f"Received a binary-encoded message:\n{state}")
elif encoding == "JSON":
Parse(message.data, state)
print(f"Received a JSON-encoded message:\n{state}")
Expand Down

0 comments on commit 0f260e4

Please sign in to comment.