dataclass-wizard icon indicating copy to clipboard operation
dataclass-wizard copied to clipboard

feat: add support for typing.Required, NotRequired

Open claui opened this issue 1 year ago • 1 comments

Previously, annotating a TypedDict field with one of the Required and NotRequired wrappers introduced in Python 3.11, dataclass-wizard would raise the following error:

TypeError: issubclass() arg 1 must be a class

This pull request fixes that error by adding support for Required and NotRequired.

See also issue #121, part of which is addressed by this PR.

claui avatar Aug 18 '24 01:08 claui

@rnag What can I do to help get this merged?

claui avatar Aug 30 '24 12:08 claui

Fixes #121 and #122

rnag avatar Nov 04 '24 02:11 rnag

@claui I'm afraid the fault lies with my general laziness and inattention to my projects 😅

Sorry for that. Just been busy with life. This looks good to merge for me, so I'll go ahead with it. Thanks again 🙏 for the huge help with TypedDict and addressing the issues that were raised (noted above).

rnag avatar Nov 04 '24 02:11 rnag

Released in v0.24.0 🎉

rnag avatar Nov 04 '24 03:11 rnag