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
Fix spurious errors when using --follow-imports=normal
#76
Conversation
@microsoft-github-policy-service agree |
@Jammf Seems like there is an issue with python 3.7, probably need to special case it for 3.7. |
It looks like there might be some issue with the
This seems to just be an issue with 3.7, and doesn't seem to be related to the changes I made (I ran local tests against That said, I'm pretty stumped on how to actually fix the tests, or even why that error is occurring in the first place. It does look like |
I have a fix for this. Basically |
ee7c971
to
2620b27
Compare
After this is merged it will be available in the next pre-release (usually the next workday) |
REF: <microsoft/vscode-mypy#76> --- --follow-imports=normal seems to have trouble with diagnositcs not updating when using dmypy. This may be because the server used by coc-mypy does not support it yet. Revert back to the --follow-imports=skip.
Fixes #62
When generating diagnostics for a file while using
--follow-imports=normal
, mypy will emit errors that occur in both the requested file and any other files it may import. However, the extension doesn't check which file an error originates from, leading to errors from other files being incorrectly reported as being for the requested file. These changes fix that behavior by stripping out all errors originating from files other than the requested file.Additionally, this changes the default
mypy
configuration to be--follow-imports=normal
. This makes it more similar to the previous behavior before #52, where--follow-imports=silent
(which is not supported bydmypy
) was used to suppress error messages while still allowing mypy to pull in useful type information from imported files.