You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm understanding the docs right. then I am supposed to install the 1.7.0 version to match the mypy version I have?
That's not correct, I guess the documentation is unclear. Is there something we can improve in the docs?
The latest version that is strictly compatible with mypy 1.7.0 is djangorestframework-stubs==3.14.5 (setup.py)
(Note: There's a tradeoff between using older -stubs versions, or updating to latest even if your Django version is not latest. See here for details: typeddjango/django-stubs#2101 (comment))
When I open my editor NeoVim with the virtual environment active I get this error message for this line of code. 1. Import "rest_framework" could not be resolved [reportMissingImports]
This error comes from pylance/pyright, not mypy.
I'm guessing you installed djangorestframework-stubs inside a virtualenv, but when NeoVim invokes pyright, it runs outside of that virtualenv and does not find the stubs package. You can probably configure it to use the venv. But sorry, can't help more there, I have not used pyright/NeoVim myself.
intgr
changed the title
Help installing the appropriate stub version.
Help installing the appropriate stub version
Sep 13, 2024
I'm not really experience with mypy and stubs. What would you recommend me doing? Would appreciate that if it's not too much of an inconveniece. Do I simply just execute these commands?
Hey, I'm not understanding which version of the stubs I need to install?
These are my installed modules per
pip list
.If I'm understanding the docs right. then I am supposed to install the
1.7.0
version to match themypy
version I have?Would the command look like this?
When I open my editor
NeoVim
with the virtual environment active I get this error message for this line of code.Hopefully someone can make sense of this and help me out :)
Cheers!
The text was updated successfully, but these errors were encountered: