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

move ref annotation validation into pydantic schema #145

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

ImogenBits
Copy link
Collaborator

This fixes #142 by moving the invocation of the extra validation step for reference validators into the pydantic core schema, rather than overriding model_validate. This ensures it is always called, regardless of the class structures and mros involved.

@Benezivas
Copy link
Collaborator

Thank you

@Benezivas Benezivas merged commit 8736216 into Algorithmic-Battle:main Nov 12, 2023
2 checks passed
@ImogenBits ImogenBits deleted the ref_annotations branch November 12, 2023 13:33
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.

Pydantic annotations using instance attributes seem to be ignored
2 participants