-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(typing): type codeowners endpoint init file #83305
Conversation
@@ -25,6 +25,7 @@ class ProjectCodeOwnerSerializer(CamelSnakeModelSerializer): | |||
raw = serializers.CharField(required=True) | |||
organization_integration_id = serializers.IntegerField(required=False) | |||
date_updated = serializers.CharField(required=False) | |||
instance: ProjectCodeOwners |
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.
ah, I commented on this in the other PR -- this isn't correct. the base class is missing its generic (and would otherwise have this typed properly)
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.
ah yup that makes sense. will put up a fix. thanks
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'm kind of confused at the typing stubs -- https://github.com/typeddjango/djangorestframework-stubs/blob/c78da6d315f0994ad472d2c2406ae5718ef36057/rest_framework-stubs/serializers.pyi#L195
it says instance can be a list, but in all the code i've seen of our own usage, it's always a singular model
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.
weird. almost looks like an oversight for ListSerializer
above it (since _BaseSerializer
doesn't do lists)
reverting as this isn't quite the correct typing. |
PR reverted: 966a66f |
This reverts commit e174368. Co-authored-by: JoshFerge <[email protected]>
No description provided.