Closed rwols closed 4 years ago
@rwols, are you able to import plugin.core.edit
when running /opt/sublime_text/Lib/python33
? If so, try https://github.com/tomv564/pyls-mypy/pull/45 (if you want), removing both env vars and adding
... (stricken)
(or similar) to pyls.settings.pyls
. (Guesses based on docs; not a Sublime Text user myself.)
Edit: red herring; bad advice; disregard.
@poppyschmo /opt/sublime_text/Lib/python33 is a folder with two python files sublime_plugin.py and sublime.py. I want mypy to be able to find these two files.
I also want mypy to be able to find ~/.config/sublime-text/Packages/LSP/plugin
as that's where .core.edit
(core/edit.py) etc lives.
/opt/sublime_text/Lib/python33 is a folder
Yikes. And here I thought it was an exe. Terrible.
Perhaps visitors to this thread more knowledgeable than I may find a working mypy command-line incantation helpful?
@rwols I briefly tried your setup and was able to reproduce the output in your screenshot using your project settings. BTW, I see now that Sublime Text comes with Python embedded. After toggling live_mode
off in Packages/User/LSP/sublime-settings
, the import errors went away, and the output matched that given by the mypy command in your tox.ini
.
As noted in the README, this means you'll have to save to trigger updates.
Thanks @poppyschmo turning off live-mode indeed works.
I never got this right in sublime text:
How do I fix this missing imports error? I'm using pyls-mypy version 0.1.8
My project settings are as follows:
I Also tried this env:
But it doesn't seem to have any effect. I also tried this:
But to no avail.