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

ref(typing): type codeowners endpoint init file #83305

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

JoshFerge
Copy link
Member

No description provided.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 13, 2025
@JoshFerge JoshFerge marked this pull request as ready for review January 13, 2025 17:16
@JoshFerge JoshFerge requested a review from a team as a code owner January 13, 2025 17:16
@JoshFerge JoshFerge requested review from a team January 13, 2025 17:16
@JoshFerge JoshFerge enabled auto-merge (squash) January 13, 2025 17:16
@JoshFerge JoshFerge merged commit e174368 into master Jan 13, 2025
50 checks passed
@JoshFerge JoshFerge deleted the jferg/type-codeowners-init branch January 13, 2025 17:16
@@ -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
Copy link
Member

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)

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member

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)

@JoshFerge JoshFerge added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Jan 13, 2025
@JoshFerge
Copy link
Member Author

reverting as this isn't quite the correct typing.

@getsentry-bot
Copy link
Contributor

PR reverted: 966a66f

getsentry-bot added a commit that referenced this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants