Closed milin closed 5 years ago
pip install pyls-mypy spawned 10+
Can you clarify what you mean by this?
This is perhaps not clear from the instructions, but the pip install
command is only to be run once to put pyls-mypy into your python environment.
After you've installed pyls-mypy
, starting up python-language-server
will cause it to search installed packages for plugins. When it finds pyls-mypy
on your system, it should detect "pyls plugin" support and hook up the mypy functionality from the package.
Let me know if this clears it up, and if you'd like to see the above clarification in the Readme.
Sorry for the confusion. Prolly should not have mentioned pip install. What i meant was after installing pyls-mypy, i see lots of python processes spawning up, when using together with python-language-server and vim-lsp, to the extent my load avg went to 150% in couple of mins, and slowing down my machine.
Do you see the same behaviour just running mypy
in your project directory?
Is it a large project where it may take some time to walk through modules etc?
The mypy API used by this plugin claims to not start new interpreters:
Since mypy still changes, the API was kept utterly simple and non-intrusive. It just mimics command line activation without starting a new interpreter.(https://github.com/python/mypy/blob/eec6745843169620f5dfbb6c2d65bf3cddedf6e6/mypy/api.py#L4)
Perhaps you can try reproducing with simple projects and with the logging for python-language-server turned on? https://github.com/palantir/python-language-server/blob/91b5e4efe9db0d9d2cb1704c6132cf39cec780cd/pyls/__main__.py#L30-L43
Is it a large project where it may take some time to walk through modules etc?
Yes.
Should have captured a ss. I will try to reproduce again with the large project and a small one and report back.
Do you have a mypy.ini
set up? Perhaps you can disable some features (see http://mypy.readthedocs.io/en/latest/config_file.html) and see if that improves the behaviour.
Closing because over a year old. Need more info to troubleshoot.
Not sure if its a bug. Tried
python-language-server
and it spawned only 1 process, but after doing a pip install and starting to usepyls-mypy
,pyls-mypy
spawned 10+