mypy-pycharm icon indicating copy to clipboard operation
mypy-pycharm copied to clipboard

(🐞) Doesn't detect mypy when using a poetry interpreter

Open KotlinIsland opened this issue 3 years ago • 9 comments

KotlinIsland avatar Jun 28 '22 00:06 KotlinIsland

Happens to me as well, tried manually specifying the bin but alas, must have something to do with poetry / pyenv paths

rickmark avatar Jul 30 '22 07:07 rickmark

Same for me when using a ssh remote interpreter

michaelwayman avatar Aug 30 '22 19:08 michaelwayman

Same for me.

I have a poetry environment created in wsl2, and I can't find the mypy interpreter with pycharm.

Is this repo still maintained?

wholmen avatar Sep 04 '22 10:09 wholmen

Currently I can provide minimal support, mostly just for critical bugs on existing features. Adding support for remote/non standard interpreters is something I can't provide. Contributions are welcome.

leinardi avatar Sep 04 '22 11:09 leinardi

@leinardi all good. I've looked at the code but have never tried tinkering and have no knowledge about the PyCharm plugins. But anyway, THANK YOU for your plugin!! I prefer it over the one that Dropbox put out :)

michaelwayman avatar Sep 04 '22 13:09 michaelwayman

Same for me. Unfortunately all my project are based on poetry and I can't make the plugin find mypy, even if I specify the path explicitly.

LucaMarconato avatar Jan 24 '23 11:01 LucaMarconato

I encountered this bug as well. From what I saw in the logs, the plugin tries to take an invalid python interpreter (in my case, an interpreter from another environment) instead of the interpreter from the currently configured environment.

Screenshot 2023-03-12 at 9 24 24 PM

Any updates on fixing this? I would fix this but I don't know how to develop plugins for pycharm...

JonatannQm avatar Mar 12 '23 19:03 JonatannQm

I used poetry with a virtualenv. The virtualenv was created with pyenv. For me, a workaround was to just find the full path to the mypy executable and paste it into the settings dialog.

For example, the full path for mypy was something like /Users/username/.pyenv/versions/venv_name/bin/mypy. Pasting that directly into the settings allowed it to work properly.

wrighter avatar Mar 14 '23 18:03 wrighter

This is what I did, but I still got the same error: Screenshot 2023-03-15 at 9 18 50 AM

The logs that I uploaded were after I used the full path. The extension is attempting to run this poetry but with a python interpreter from a different poetry environment, so it does not work

JonatannQm avatar Mar 15 '23 07:03 JonatannQm