-
Notifications
You must be signed in to change notification settings - Fork 36
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
Remove '--follow-imports silent' from mypy args #82
Remove '--follow-imports silent' from mypy args #82
Conversation
This essentially reverts 83df547. The main reason for doing this is that this is not the default option when running `mypy`, which means that (absent other configuration) running `mypy .` and using `pylsp-mypy` will invalidate each others caches, which will cause both things to slow down. `--follow-imports silent` is also incompatible with `dmypy`, so working around this issue by specifying `follow_imports = 'silent'` in your `pyproject.toml` is a non-starter if you want to use `dmypy`. Closes python-lsp#81
Is there a reason for using |
Our tests include a mypy run, and I run it before I push. Sometimes a change made in one file causes errors in the files that use it, and it's good to find out about that before pushing. |
Gentle ping? I'd like to see #81 fixed. This is one possible solution (and I think it's the one that makes most sense), but maybe there are other proposals to pursue instead? |
While your PR likely breaks nothing as there is a guard already in place to filter out output from other files, avoiding this output in the first place (and potential associated runtime cost) seems to be sensible for me. In that regard the reasoning for the introduction of this flag still stands. You can turn it off using overrides. So either way it works, this is just about style? |
It's more about the default config being broken (if you care about caching): mypy run from the lsp with the default config will invalidate the cache of mypy from the CLI with the default config. |
How would you feel about making |
I think it would be an acceptable compromise but a little bit strange from pylsp-mypy's standpoint: after all, this setting doesn't really have an observable effect on pylsp itself (aside from the performance thing). I'd be happy to use it in any case, though. |
Yes, you are correct, it is a little strange. |
I have implemented the new option and released it. I hope this suits your need. |
This essentially reverts 83df547.
The main reason for doing this is that this is not the default option when running
mypy
, which means that (absent other configuration) runningmypy .
and usingpylsp-mypy
will invalidate each others caches, which will cause both things to slow down.--follow-imports silent
is also incompatible withdmypy
, so working around this issue by specifyingfollow_imports = 'silent'
in yourpyproject.toml
is a non-starter if you want to usedmypy
.Closes #81
This would effectively be a revert to tomv564#12. cc @eliwe.