Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add default for PayloadMeta extra_data #80

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

maydewd
Copy link
Contributor

@maydewd maydewd commented Oct 30, 2018

We should default PayloadMeta.extra_data to an empty dictionary so that the user doesn't have to do verbose if payload.payload_meta.extra_data is not None and ... checks when they want to access it. This matches the behavior of RequestMeta. Also updating type signatures to reflect the actual underlying types (which is how these would look if they were real python 3.7 data classes).

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.059% when pulling 3d0ce29 on maydewd:extradata into 0fcdb4b on PUNCH-Cyber:v2.

@mlaferrera mlaferrera merged commit 9f91d34 into PUNCH-Cyber:v2 Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants