-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add dependencies with plugins? #8
Comments
Yeah, mypy_primer doesn't yet support plugins — you'll notice mention of dry-python/returns at Line 1249 in 7c00c13
The difficulty, as you mentioned, is that mypy and the projects are installed in different venvs. This allows us to reuse the same mypy venv across projects / easily change the mypy version independently. I think one (possibly overkill) way of doing this is if we can get the project specific venv to "inherit" the mypy installation from the mypy venv. I bet there's some fun |
@hauntsaninja yeah, this was a pleasant surprise! 🙂
I think that it is also possible to install |
Yes, it works after a quick experiment:
|
Yeah, that's possible, it's just a little tricky to get right. E.g., you'd need to prevent "old mypy" and "new mypy" from running in parallel on the same project. There are some other gotchas too (bisection, using mypy pypi wheels). |
Maybe we can add something like
to plugins' This will just contain the command we need to install this in For example, I am very worried about my projects are not tested (because the most complex ones break the most). And I would totally opt-in. |
Would specifying the plugin by path instead of module name work like what edgedb does right now? edgedb/edgedb#2627 seems to suggest that doing that makes installing the plugin unnecessary. |
I just wanted to mention on this issue that I think I did figure out an approach to make |
Hi! Thanks a lot for this tool!
I am trying to add https://github.com/dry-python/returns support (because we have quite a lot of complex plugins).
Code:
returns
is based onpoetry
, notpip
. Butpip
is able to install everything frompyproject.toml
locally.The next problem is that our plugin is not found:
Looks like the problem comes from a fact that
mypy
andreturns
use different venvs. But, I am not sure how to fix this.The text was updated successfully, but these errors were encountered: