Skip to content

Cannot find module named 'rest_framework' #31

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

Closed
kolomenkin opened this issue Feb 26, 2019 · 1 comment
Closed

Cannot find module named 'rest_framework' #31

kolomenkin opened this issue Feb 26, 2019 · 1 comment

Comments

@kolomenkin
Copy link

Hi,

Do you have any plans to support Django Rest Framework?

I'm getting the following problem:

from rest_framework import serializers

class MySerializer(serializers.ModelSerializer):
    pass

The mypy --strict output:

main\rest_api\serializers.py:1: error: Cannot find module named 'rest_framework'
main\rest_api\serializers.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
main\rest_api\serializers.py:4: error: Class cannot subclass 'ModelSerializer' (has type 'Any')
@kolomenkin
Copy link
Author

Sorry, I've found corresponding project:

https://github.com/mkurnikov/djangorestframework-stubs

@TonyRippy TonyRippy mentioned this issue Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants