typeddjango / pytest-mypy-plugins

pytest plugin for testing mypy types, stubs, and plugins
https://pypi.org/project/pytest-mypy-plugins/
MIT License
100 stars 26 forks source link

Ease testing of local stubs by extending "MYPYPATH" #130

Closed Delgan closed 12 months ago

Delgan commented 12 months ago

Hi!

I would like to propose a fix for #17.

I'm using a stub file and I noticed that pytest-mypy-plugins did not work well in the following scenarios:

I think possible workarounds have been implemented (like importing mypy_path and MYPYPATH), but they don't seem to work out of the box. Any reason not to automatically add the project sources to paths searched by Mypy?

Delgan commented 12 months ago

@sobolevn I cloned the two repository locally, applied my patch manually, and ran the tests suite. Both succeeded. :+1:

sobolevn commented 12 months ago

Thanks for doing this!