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

Fix status.HTTP_200_OK #125

Merged
merged 3 commits into from Jan 28, 2021
Merged

Fix status.HTTP_200_OK #125

merged 3 commits into from Jan 28, 2021

Conversation

vhtkrk
Copy link
Contributor

@vhtkrk vhtkrk commented Jan 27, 2021

status.HTTP_200_OK should be Literal[200], not Literal[202]. Fixes #123.

I cannot run pytest because of #124, but I don't see how this could break anything.

@sobolevn
Copy link
Member

This happens because mypy@0.800 changes how it treats re-exports.
Right now it treats re-exports as "explicit" only if the import/export names do match.

Right: from some import coreapi as coreapi
Wrong: from some import other as coreapi

@vhtkrk
Copy link
Contributor Author

vhtkrk commented Jan 27, 2021

You're right; seems like pinning mypy to 0.790 fixes the tests (and then all tests pass with this change). Looks like the CI is also affected by that...

@sobolevn
Copy link
Member

@vhtkrk can you please also pin it for now in this PR? Thanks!

@vhtkrk
Copy link
Contributor Author

vhtkrk commented Jan 27, 2021

Done. Now also fixes #124.

@sobolevn
Copy link
Member

I guess that it is better to add it here: https://github.com/typeddjango/djangorestframework-stubs/blob/master/setup.py#L22

@sobolevn
Copy link
Member

mypy>=0.790,<0.800

@palfrey palfrey mentioned this pull request Jan 27, 2021
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!

@sobolevn sobolevn merged commit 83f421d into typeddjango:master Jan 28, 2021
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.

status.HTTP_200_OK is Literal[202]
2 participants