Closed uglycoyote closed 5 years ago
The main (and hopefully) only difference should be that the plugin is using skip
for the follow-import
parameter:
/home/rleinardi/Workspace/misc/my/gsi/venv/bin/mypy --show-column-numbers --follow-imports skip /home/rleinardi/Workspace/misc/my/gsi/gsi/presenter.py
The reason why I am using it is that without it, if I scan a specific file, I get errors also from all the imported files.
@leinardi Yes the --follow-imports skip
does explain why the "Check Current File" option gave less errors than I expected. Like you, I also was only interested in seeing only errors from the current file, but was hoping it would be a complete list of errors. Not following the imports has the unfortunate effect of suppressing errors in the current file related to types defined in those external files.
So, maybe having the follow-imports
thing be optional would be good.
I'm still a bit puzzled why, in my larger project, there were errors that didn't appear in the "Check Module" list which did appear on the command line. But that may be due to my poor understanding of what a "module" is. (#20 will help with this). On the command line I was running mypy on a particular directory which was working well for me, but there doesn't seem to be the option for that in the plugin, unless module is a synonym for directory. I'm not really wanting to use "Check Project" because my project is very large. I tried it right now just too see what would happen but it just made PyCharm completely unresponsive for the last five minutes or so.
This issue has been automatically marked as stale because it has not had activity in the last 60 days.
What about switching from --follow-imports skip
to --follow-imports silent
?
For our project it seems to be fixing opposite issue of reporting false positives (which are not reported during per module run)
Step 1: Are you in the right place?
Step 2: Describe your environment
0.10.2
Community Edition 2018.2
0.630
(installed in venv folder automatically by plugin)Step 3: Describe the problem:
I'm encountering cases where the plugin is failing to list mypy errors in the error list window, but running mypy on the command line shows the errors.
I'm getting this in a large and complex proprietary project that I cannot paste the source of, but I have reproduced similar behaviour in a small test project
Steps to reproduce:
File1.py
andFile2.py
in File1.py:
in File2.py:
File2.py
open, press the "Check Current File" button in in the mypy plugin windowObserved Results:
On the command line, I get the following errors from the same mypy executable that the plugin installed for me automatically:
but in the mypy plugin window I only get one of the errors, only the one about the variable
b
None of the errors related to the
MyClass
defined inFile1.py
appear.When I run using the "Check Module" button in the plugin I do successfully get all four errors in this case
However, I'm unsatisfied with this for two reasons:
MyClass
type even though it is defined externally, so why should the plugin not be able to?