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

squash internal __root__ models in .dict() #1607

Merged
merged 2 commits into from Jun 27, 2020

Conversation

patrickkwang
Copy link

@patrickkwang patrickkwang commented Jun 6, 2020

Change Summary

This change squashes {'__root__': X}X when converting a nested model to dict. This does not make that change at the outermost level, so .dict() still always returns a dict (as discussed in #1193).

Related issue number

#1414

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@patrickkwang
Copy link
Author

This solution is an alternative to #1429 by @silversurfer34, which is a bit more involved and only impacts .json().

@codecov
Copy link

codecov bot commented Jun 6, 2020

Codecov Report

Merging #1607 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #1607   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3796      3796           
  Branches       752       752           
=========================================
  Hits          3796      3796           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e82689...bb22ec7. Read the comment docs.

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

2 participants