-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(types): add Union
and Optional
to typing.h
#5165
Conversation
Looks useful. I just converted this to a Draft PR. Could you please work on the GitHub Actions failures? Then click Ready for review and maybe tag me. |
Will do. It seems to be falling into the default |
Maybe you just something like this? https://github.com/pybind/pybind11/pull/5073/files |
The solution was to inherit from one of the types found in |
@rwgk the CI is now passing. |
With further testing on actual code this does not seem to currently work. |
@rwgk With some updated testing and switching to inheriting from |
Union
and Optional
to typing.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I'll run this by other maintainers for a 2nd set of eyes.
Union
and Optional
to typing.hUnion
and Optional
to typing.h
Union
and Optional
to typing.hUnion
and Optional
to typing.h
Union
and Optional
to typing.hUnion
and Optional
to typing.h
Description
Add
Union
andOptional
for better static typing on the python side.Suggested changelog entry: