bumpy-noon-80834
10/01/2022, 12:01 AM./pants lint :: everything is fine. But when I run pylint through VSCode using python.linting.pylintPath=./dist/export/python/virtualenvs/tools/pylint/bin/pylint, I get pylint's impor-error because the tools/pylint apparently doesn't understand my imports, despite PYTHONPATH being defined in .env. BTW, the .env looks fine as VSCode itself has no issue resolving those imports. Any idea how I could troubleshoot this further?bumpy-noon-80834
10/01/2022, 12:32 AMbumpy-noon-80834
10/01/2022, 10:14 AMbumpy-noon-80834
10/01/2022, 10:14 AMbumpy-noon-80834
10/02/2022, 7:55 PM./pants lint works? (it does work fine!)
If it uses pylint from the tools/pylint virtualenv, how can it have access to the dependencies installed in the python-default virtualenv?bumpy-noon-80834
10/04/2022, 9:03 AMbitter-ability-32190
10/04/2022, 11:20 AMbitter-ability-32190
10/04/2022, 11:22 AMbumpy-noon-80834
10/04/2022, 11:22 AM./pants lint --lint-only=pylint :: work?
There must be a clean way to run pylint since that's working!bitter-ability-32190
10/04/2022, 11:22 AMbumpy-noon-80834
10/04/2022, 11:23 AMbitter-ability-32190
10/04/2022, 11:25 AMbitter-ability-32190
10/04/2022, 11:27 AMbitter-ability-32190
10/04/2022, 11:29 AMbumpy-noon-80834
10/04/2022, 11:29 AMbitter-ability-32190
10/04/2022, 11:33 AMbitter-ability-32190
10/04/2022, 11:35 AMbitter-ability-32190
10/04/2022, 11:36 AMbumpy-noon-80834
10/04/2022, 11:37 AMbumpy-noon-80834
10/04/2022, 11:39 AM$ cat .vscode/scripts/pylint.sh
#!/bin/sh -eu
env PANTS_PYLINT_ARGS="$@" -- ./pants lint --lint-only=pylint ::bitter-ability-32190
10/04/2022, 12:30 PMbitter-ability-32190
10/04/2022, 12:31 PMbumpy-noon-80834
10/04/2022, 4:10 PMbitter-ability-32190
10/04/2022, 4:15 PMbumpy-noon-80834
10/04/2022, 8:00 PM.env file with proper $PATH (all roots + all exported virtualenvs) and $PYTHONPATH (all exported virtualenvs).
It also generates a .vscode/settings.json file to define the defaultInterpreterPath.
Works well here!