Skip to content

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

Merged
kdmccormick merged 3 commits intomasterfrom
kdmccormick/django-stubs
Jan 2, 2025
Merged

build: upgrade django-stubs and djangorestframework-stubs#36053
kdmccormick merged 3 commits intomasterfrom
kdmccormick/django-stubs

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
49 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