-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Serializer.validators type does not include Unique... validators #555
Comments
I have encountered the same issue! |
@mschoettle I'm a junior developer, can I take a look at this? |
@Limsunoh Yes, of course |
@mschoettle I've made code fixes and test code, can I put them together in a PR? But I'm not sure if this is correct |
|
@Limsunoh Most open source repositories (this one included) will have a contribution guide you can use to understand what the requirements in a PR are |
Bug report
What's wrong
The
Serializer.validators
property has the typeThis is the result of
reveal_type(self.validators)
on an instance ofModelSerializer
. I don't see it explicitly defined inserializers.pyi
so I am not sure where exactly it is coming from.When evaluating the elements of the list against
UniqueTogetherValidator
mypy reports that the condition always returnsFalse
.None of the Unique... validators are a type that is mentioned above so that is my assumption why that is.
How is that should be
The type for the
validators
property should include theUnique...
validators (at least forModelSerializer
).System information
python
version: 3.122django
version: 4.2.11mypy
version: 1.8.0django-stubs
version: 4.2.7The text was updated successfully, but these errors were encountered: