quaint-telephone-89068
01/19/2023, 3:25 PM--python-executable=<value> leads to mypy (somehow) seeing packages installed in the system site-packages.
The run uses --python-executable=./requirements_venv.pex_bin_python_shim.sh. Running that shim and requesting sys.path does show that the global site-packages are NOT part of the sys,path (thanks to PEX stripping them). So mypy must be assuming them based on some other info.
This was found because our sandbox uses a package of a version without type annotations, but on some dev boxes mypy will complain about incompatible types. This is only on dev boxes where user has an install of that package that is newer (and contains type hints).
Pants version
2.14+
OS
N/A
Additional info
N/A
pantsbuild/pants