-
Notifications
You must be signed in to change notification settings - Fork 28
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
--ignore-missing-imports
not working for all imports
#208
Comments
@danparizher Check the logs (Output > mypy type checker), if it is using |
@karthiknadig It looks like Here are my logs upon copy + pasting the above code snippet into my editor:
|
This looks like a bug in |
Had the same issue, but was able to resolve by setting |
This fixed it for me, thank you so much! |
I want to add something to this discussion because we have a similar problem: For us, mypy behaves in a strange way too when run through this extension, but not when running from the command line. In our case it has to do with Now comes the strange part: in both cases it really uses our own Setting |
I have also confirmed that |
The only thing this extension does is capture the output and parse it in a way that we can display in the UI. If running mypy from terminal results in the same error then this should be filed on |
@Mutantpenguin Are you using Another thing you could try is setting the config path via the |
I already use Specifying a config via When using
|
I can confirm this issue. When using |
I just pushed 2023.7.13112243 (pre-release) which should have the fix for I am not really sure what is the difference between how the extension runs vs CLI. The extension uses the workspace directory as the CWD, and launches @danparizher If you copy paste the command from the logs and run from your terminal from the same CWD as in the logs do you still see the difference?
|
@karthiknadig running that command with the above code snippet yields the following output:
If I only have
|
I think I fixed the problem for me, but I don't think this is a general fix. In my case I am using a multiroot workspace where the other projects are also installed as editable packages in the corresponding venv. I was using When I am using I am unsure if this is a good idea, but if it stays it needs to be explained somewhere that it has an effect on mypy |
Using settings:
Error still occurs for the
requests
package in this code snippet:In IDE interface:
When executing from the CLI with the same flag, functions as expected:
The text was updated successfully, but these errors were encountered: