-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support for validate_call
with generics
#7796
Comments
@validate_call
doesn't catch wrong type being passed to parametrized generic method@validate_call
doesn't catch wrong type being passed to parametrized generic method; generic functions also have the same issue
Thanks for reporting this. It does seem to be a bug 🐛. |
Going to move this to a |
@validate_call
doesn't catch wrong type being passed to parametrized generic method; generic functions also have the same issuevalidate_call
with Generics
validate_call
with Genericsvalidate_call
with generics
Hi @sydney-runkle, since the #7928 has been closed, would it make sense to add this issue to a milestone, since it seems to be your new approach to issues? |
This isn't a super high priority issue at the moment, so I don't think we'll add it to the 2.7 milestone. If there's more community support, or if someone wants to take this on, we can certainly move up the timeline! |
A good example of this lack of support: #9536 |
I'm going to add this to v2.9 - this is something I'd like to work on, though it will take a back seat compared to performance concerns in the 2.9 sprint. |
Initial Checks
Description
validate_call
should catch wrong types being passed to any function/method; however, it breaks when used with parametrized generic methods.A similar issue occurs when generic functions have incorrect return type.
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: