-
Notifications
You must be signed in to change notification settings - Fork 238
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
Update deprecated call of general_plain_validator_function (#676) #897
Update deprecated call of general_plain_validator_function (#676) #897
Conversation
I would love this to merged! Most of my pytests warning on a project of mine are actually caused by this. @roman-right, FYI, the deprecation was done by this PR: pydantic/pydantic-core#980 |
Hi @hasB4K , Thank you for following up. I'll pick it up at the beginning of the next week. |
return core_schema.with_info_plain_validator_function( | ||
cls.build_validation(handler, source_type) | ||
) |
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.
I was reading the original code, and my IDE seems to complain that this code is unreachable.
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.
Yeah that was also my case but as my PR is only related to deprecation I only changed the deprecated calls. Perhaps this needs a separate PR.
It looks good. I plan to have it merged at this weekend |
Merged. It will be published today |
https://docs.pydantic.dev/latest/api/pydantic_core_schema/#pydantic_core.core_schema.with_info_plain_validator_function