quaint-telephone-89068
12/29/2022, 10:53 PMpants.backend.python.typecheck.mypy and the backend pants.backend.experimental.python.typecheck.pyright, the sandboxes obtained are different: they don't contain the same amount of my code. The pyright sandbox is missing some sources compared to the mypy sandbox.
Given the following repo:
├── BUILD
├── kaiko
│ └── geometry
│ ├── *.py
├── requirements.txt
├── tests
├── BUILD
├── test_*.py
with the top-level BUILD file being:
python_requirements(name="kaiko-geometry-reqs")
python_sources(
name="kaiko-geometry",
sources=["kaiko/geometry/**/*.py"],
dependencies=[
":kaiko-geometry-reqs#numpy",
],
)
and the BUILD file in tests being:
python_tests(
name="kaiko-geometry-tests",
dependencies=[
"//:kaiko-geometry-reqs",
"//:kaiko-geometry",
],
)
python_test_utils(
name="kaiko-geometry-test-utils",
dependencies=[
"//:kaiko-geometry-reqs",
"//:kaiko-geometry",
],
)
I obtain such a sandbox with the mypy backend:
├── kaiko
│ └── geometry
│ ├── *.py
└── tests
├── test_*.py
while the sandbox obtained with the pyright backend is:
tests/
├── *.py
i.e. the kaiko/geometry folder is missing.
In both cases, I ran the command PANTS_SHA=20ac158e6dc50821fb465a0d3f67f96c8079a19a ./pants --keep-sandboxes=on_failure check tests:kaiko-geometry-tests to obtain the sandbox.
Pants version
Using commit 20ac158.
OS
Tested on Ubuntu 22.04
* * *
cc @sureshjoshi
pantsbuild/pants