https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-xylophone-16214

08/04/2022, 10:24 PM
Hi all, I'm trying to get type checking for pytest files working in VS Code. The issue is that pytest and its plugins aren't in the
python-default
virtualenv so I end up with a bunch of errors like
Import "pytest_mock" could not be resolved
. I've managed to workaround the issue by adding pytest and its plugins to both
requirements.txt
and
pants.toml
, but that's not ideal for maintainability. Is there a better solution?
h

hundreds-father-404

08/04/2022, 10:26 PM
Hey Dan, this is most likely best addressed by https://github.com/pantsbuild/pants/issues/12449
f

fresh-xylophone-16214

08/04/2022, 10:28 PM
@hundreds-father-404 Thanks! At least now I know I wasn't missing something. 🙂
❤️ 1
h

hundreds-father-404

08/04/2022, 10:29 PM
You're welcome! Pardon the issue. Would you have any interest in helping to implement? I started doing the prework but life got busy for me - I could pick back up the prework soon if helpful
f

fresh-xylophone-16214

08/04/2022, 10:31 PM
Unfortunately, I really don't have the time. I am planning on building a pyright plugin, though.
🙌 1
h

hundreds-father-404

08/04/2022, 10:32 PM
Neat!