Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Forbid None for Msg.Metadata fields #401

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

orsinium
Copy link
Contributor

@orsinium orsinium commented Dec 16, 2022

  1. Remove | None from Msg.Metadata fields
  2. Move the code constructing the Metadata into a constructor of Metadata (Metadata._from_reply). Let the class make itself.
  3. Move token count constants on the module level, as recommended by PEP 8. There are more constants in Ack that shouldn't be there, I'll take care of them later.
  4. Make Msg.Metadata immutable.

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wallyqs wallyqs merged commit 5c50e5e into nats-io:main Jan 12, 2023
@orsinium orsinium deleted the msg-metadata-no-none branch January 13, 2023 15:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants