Closed gwax closed 6 years ago
👍 I'll have to take a closer look when I'm home from work but first glance looks good. Caught a few documentation errors too, appreciate that.
Being curious, how easy was this to implement? Is there anything that the library should do differently in your opinion?
This was pretty easy to implement because it mostly layered on top of what you had already done.
The converter portion took a little thinking but was totally reasonable.
Looking at #11, I think it will be pretty easy to abstract a few pieces of this code and add support for the Python 3.6 dataclasses backport. In anticipation of that, I might rearrange this and move marshmallow_annotations.namedtuple
to marshmallow_annotations.ext.namedtuple
.
I have moved the core default handling functionality into BaseConverter, put default value stripping behind a Meta
option flag, and moved the namedtuple code to marshmallow_annotations.ext
.
I think this is good to go now.
Totals | |
---|---|
Change from base Build 64: | 0.0% |
Covered Lines: | 217 |
Relevant Lines: | 217 |
I believe that I have addressed your feedback.
:+1:
:beers: Just released 2.1.0 with this. Figured you wanted to use it in something so might as well make it easy to use.
I started building out something very similar with a focus on supporting
typing.NamedTuple
as a central model construct. After stumbling on your project, it seemed easier to port my work to live on top ofmarshmallow-annotations
than to try and roll my own parallel project.