Hello there, I’m using pants with a VSCode devcont...
# general
m
Hello there, I’m using pants with a VSCode devcontainer. Now I’m trying to access Pylint, MyPy, Black etc. from VSCode UI, so that e.g.
Python: Run Linting
from the Command Palette works, or
Format Document
when right-clicking in the workspace. I’ve kind of got this working by adding following lines into the devcontainer.json -> "settings" after exporting the virtualenv with those tools through pants export:
Copy code
"python.defaultInterpreterPath": "./dist/export/python/virtualenvs/default/3.8.13/bin/python",

"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.mypyEnabled": true,
"python.formatting.blackEnabled": true,
"python.formatting.provider": "black",
"python.linting.pylintPath": "./dist/export/python/virtualenvs/tools/pylint/bin/pylint",
"python.linting.mypyPath": "./dist/export/python/virtualenvs/tools/mypy/bin/mypy",
"python.formatting.blackPath": "./dist/export/python/virtualenvs/tools/black/bin/black",
From previous experimenting with pants I know I got this working without having to define paths for each tool. Sadly, I forgot what I did then. What do I miss? Having to manually point each tool into one path seems prone to errors when using multiple environments. I need a way that VSCode gets a path to the virtualenvs-directory etc, so that the paths are automatically identified. Thanks for your help.
b
Hi @modern-stone-88910. Sorry you haven't gotten a reply to this. Usually we are more responsive. Unfortunately, I think we don't have anyone with requisite devcontainers experience. My apologies. :-(
h
Hi, sorry, unfortunately I don't think we have any VSCode users in the core maintainers group at least
I have been meaning to start using it, since a lot of our users do
m
No problem, thanks for the respone :)