We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using mypy with the Django plugin. When I reference request.user_agent with a function like this:
from django.core.handlers.wsgi import WSGIRequest def get_application(request: WSGIRequest) -> Application: if request.user_agent.is_mobile: pass
mypy complains:
error: "WSGIRequest" has no attribute "user_agent"
Is there a way to resolve this error? All I can think of right now is to ignore it with # type: ignore.
# type: ignore
Here is the mypy config file for reference:
[mypy] ignore_missing_imports = True plugins = mypy_django_plugin.main [mypy.plugins.django-stubs] django_settings_module = myapp.settings.base
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using mypy with the Django plugin. When I reference request.user_agent with a function like this:
mypy complains:
error: "WSGIRequest" has no attribute "user_agent"
Is there a way to resolve this error? All I can think of right now is to ignore it with
# type: ignore
.Here is the mypy config file for reference:
The text was updated successfully, but these errors were encountered: