forked from tomv564/pyls-mypy
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
In a monorepo setting using Pantsbuild, various Python tools are installed in separate virtaulenvs like:
dist/export/python/virtualenvs/mypy/3.12.6/bin/mypydist/export/python/virtualenvs/ruff/3.12.6/bin/ruff
while the main source tree looks at (while it is also possible to have per-subdir lock files):
dist/export/python/virtualenvs/python-default/3.12.6/bin/python
I can override the --python-executable argument passed to mypy for the main virtualenv, but I cannot override the mypy executable path itself.
It seems to be hardcoded here:
pylsp-mypy/pylsp_mypy/plugin.py
Lines 307 to 313 in 9be427d
| if shutil.which("mypy"): | |
| # mypy exists on path | |
| # -> use mypy on path | |
| log.info("executing mypy args = %s on path", args) | |
| completed_process = subprocess.run( | |
| ["mypy", *args], capture_output=True, **windows_flag, encoding="utf-8" | |
| ) |
Could we make it something configurable?
Metadata
Metadata
Assignees
Labels
No labels