tomv564 / pyls-mypy

Mypy plugin for the Python Language Server
MIT License
110 stars 62 forks source link

Add '--follow-imports silent' to mypy invocation #12

Closed eliwe closed 5 years ago

eliwe commented 6 years ago

Else we get all the errors for all the imported files on the current file.

tomv564 commented 6 years ago

Sounds reasonable. I'm a bit worried that hardcoding this will prevent users making other choices for this setting in mypy.ini, but perhaps this is an unlikely problem?

There is a recent effort integrating support for the mypy daemon, which might replace this plugin altogether: https://github.com/palantir/python-language-server/pull/392

eliwe commented 6 years ago

Form what I can see the LSP server (and LSP protocol) expect to get back errors for the specified file only. There is no field to return in a different file.

tomv564 commented 5 years ago

Sorry for the slow response. Key information for me was that this option doesn't reduce quality by replacing imports with Any. Looking at the docs, this is what skip does, while silent strictly checks with imported types unless not found. Sounds ideal as a default.