Skip to content

Support namedtuples - #161

Merged
jcrist merged 3 commits into
mainfrom
support-namedtuple
Jul 28, 2022
Merged

Support namedtuples#161
jcrist merged 3 commits into
mainfrom
support-namedtuple

Conversation

@jcrist

@jcrist jcrist commented Jul 28, 2022

Copy link
Copy Markdown
Member
  • Adds support for encoding subclasses of tuples
  • Adds support decoding into typing.NamedTuple/collections.namedtuple types

Fixes #158.

jcrist added 3 commits July 27, 2022 22:44
These decode from arrays and support default/optional parameters. Note
that unlike Structs with `array_like=True`, decoding an array longer
than the number of fields in the `NamedTuple` will result in a
`ValidationError`.
@jcrist
jcrist merged commit 69b9d58 into main Jul 28, 2022
@jcrist
jcrist deleted the support-namedtuple branch July 28, 2022 05:42
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.

Support NamedTuple types

1 participant