-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Q: using mypy in virtual environments #7360
Comments
Hi! You can use the You shouldn't run into an internal error, so if you could provide steps to reproduce that, it would be greatly appreciated. |
Hi,
Any hints what I'm doing wrong? Regards, Thomas |
I continued troubleshooting this and it gets more weird. I uninstalled mypy globally (located in Regards, Thomas |
Ah, it is likely that these projects do not provide type information, so mypy can't use them. I do see how this message could be rather confusing. You will need to ignore these errors. See https://mypy.readthedocs.io/en/latest/common_issues.html#spurious-errors-and-locally-silencing-the-checker and https://mypy.readthedocs.io/en/latest/installed_packages.html. You may also want to read the getting started section of the docs as well. @JukkaL what do you think of changing the error to something like |
Ah, ok, I see, in that way it then makes sense. The error message is indeed misleading in many ways. Sorry for the inconveniences! Regards, Thomas |
@ethanhs I would rather add a note (once per module) saying roughly something like: |
@ilevkivskyi sure that sounds good to me 👍 |
A bit late, but can you explain the difference between these?
The first three seem to say "no type information"—the last says "no module" (to This is a run in a >>> import imblearn
>>> # silence is golden |
Closing as a duplicate of #4542 |
Hi,
I have a question about mypy usage in virtual environments. I'm running my development jobs on a Mac and thus I have installed mypy globally, but everything else I need for a project in a virtual environment. This ends up in a mess, of course. mypy complains that it won't find modules, which are installed only in this specific environment, but I don't want to install mypy in every single development environment I have.
What's a possible solution? I tried to modify mypy in setting up a setup.cfg in the root of a project, but this ends up with an internal error.
In addition it would be great if someone knows how to use mypy in Atom as well in virtual environments.
Please advice. Many thanks in advance!
Regards, Thomas
The text was updated successfully, but these errors were encountered: