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

Add CallableDiscriminator and Tag #7983

Merged
merged 9 commits into from Nov 1, 2023
Merged

Conversation

dmontagu
Copy link
Contributor

I think this should be preferred over #6915, mostly because the implementation there involves duplicating the list of types in the union, and generally seems more fragile.

I've opened as draft until docs/tests are added, hoping @sydney-runkle can help get this across the line tomorrow.

Copy link

cloudflare-pages bot commented Oct 31, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: edccdde
Status: ✅  Deploy successful!
Preview URL: https://0dd7c17c.pydantic-docs2.pages.dev
Branch Preview URL: https://callable-discriminator-v2.pydantic-docs2.pages.dev

View logs

pydantic/types.py Outdated Show resolved Hide resolved
pydantic/types.py Outdated Show resolved Hide resolved
pydantic/types.py Outdated Show resolved Hide resolved
docs/errors/usage_errors.md Outdated Show resolved Hide resolved
@dmontagu dmontagu marked this pull request as ready for review November 1, 2023 19:59
Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the fast turnaround @dmontagu!

@sydney-runkle sydney-runkle merged commit 9868b45 into main Nov 1, 2023
60 checks passed
@sydney-runkle sydney-runkle deleted the callable-discriminator-v2 branch November 1, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants