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

build: upgrade django-stubs and djangorestframework-stubs #36053

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Dec 20, 2024

...now that we're on django>=4.2

This will allow us to annotate Django-based and DRF-based code more expressively and correctly going forward. It should have no functional impact.

See individual commits for more details.

@kdmccormick kdmccormick force-pushed the kdmccormick/django-stubs branch from 321ddfa to 1d6d6b9 Compare January 2, 2025 15:59
@kdmccormick kdmccormick marked this pull request as ready for review January 2, 2025 16:03
This clunky yet type-safe workaround to this django-stubs issue, which
arose when we upgraded django-stubs in the previous commits:
typeddjango/django-stubs#1802
...not a Serializer, as it overrides to_representation to a str rather
than a dictionary.

This type error arose during the djangorestframework-stubs upgrade in
the previous commits.
@kdmccormick kdmccormick force-pushed the kdmccormick/django-stubs branch from 1d6d6b9 to 33174db Compare January 2, 2025 16:19
@kdmccormick kdmccormick merged commit d36560d into master Jan 2, 2025
50 checks passed
@kdmccormick kdmccormick deleted the kdmccormick/django-stubs branch January 2, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants