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

base.pyi: use base class HttpResponseBase #2459

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Conversation

dnet
Copy link
Contributor

@dnet dnet commented Dec 6, 2024

Previously, this was only a Callable but 125f31a restricted the last parameter to HttpResponse which is unnecessarily strict, as it does not cover things like StreamingHttpResponse and its descendant FileResponse among others – while view functions can return these as well. They have a common base class HttpResponseBase – I guess this would be a better choice here.

dnet and others added 2 commits December 6, 2024 18:02
Previously, this was only a `Callable` but 125f31a restricted the last parameter to `HttpResponse` which is unnecessarily strict, as it does not cover things like `StreamingHttpResponse` and its descendant `FileResponse` among others – while _view_ functions can return these as well. They have a common base class `HttpResponseBase` – I guess this would be a better choice here.
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! But, CI is broken. I suggested a fix.

django-stubs/urls/base.pyi Show resolved Hide resolved
@sobolevn sobolevn merged commit ea16b44 into typeddjango:master Dec 6, 2024
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants