<#17225 Sandboxes when executing mypy and pyright ...
# github-notifications
q
#17225 Sandboxes when executing mypy and pyright differ Issue created by smelc Describe the bug When I run the backend
pants.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:
Copy code
├── BUILD
├── kaiko
│   └── geometry
│       ├── *.py
├── requirements.txt
├── tests
    ├── BUILD
    ├── test_*.py
with the top-level BUILD file being:
Copy code
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:
Copy code
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:
Copy code
├── kaiko
│   └── geometry
│       ├── *.py
└── tests
    ├── test_*.py
while the sandbox obtained with the
pyright
backend is:
Copy code
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