Closed Tambup closed 4 years ago
Hi @Tambup,
Right now we are working on the integration of pyls_mypy to spyder, https://github.com/spyder-ide/spyder/pull/13360 where we'll add that option in the preferences.
This work is taking some time, so we are planning to add it to our next release after Spyder 4.2.
Thanks for reporting!
As you found a way to fix it, I'm going to close this issue. For now please continue with that fix until we create the release with mypy :)
Problem Description
Using pyls-mypy when i include a simple module created by me it gives me an error in the line where i include this and then doesn't notify any mypy warning.
What steps reproduce the problem?
def func(variable: int): return 19
If func is called inside the file toInclude, it signal the incompatibility type.import toInclude as inc
inc.funz(2.5)
the first line signals this error:and than suggest a link to the documentation of mypy. The second line has no error.
What is the expected output? What do you see instead?
The error should be on the second line, signaling the type mismatch.
Versions
Dependencies
Found solution
To solve this error i changed ~/.local/lib/python3.8/site-packages/pyls_mypy/plugin.py at the following line from (i installed pyls-mypy with pip option --user):
live_mode = config.plugin_settings('pyls_mypy').get('live_mode', False)
to:live_mode = config.plugin_settings('pyls_mypy').get('live_mode', True)
Could be very worth if in the preferences of spyder (or in some conf file of spyder, not of pyls-mypy) this option could be setted. With this solution to get the errors is mandatory to save before the file.
Thanks for the great work and support.