leinardi / mypy-pycharm

A plugin providing both real-time and on-demand scanning of Python files with Mypy from within PyCharm/IDEA.
Apache License 2.0
194 stars 31 forks source link

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

Open KotlinIsland opened 2 years ago

rickmark commented 2 years ago

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

michaelwayman commented 2 years ago

Same for me when using a ssh remote interpreter

wholmen commented 2 years ago

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?

leinardi commented 2 years ago

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.

michaelwayman commented 2 years ago

@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 :)

LucaMarconato commented 1 year ago

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.

JonatannQm commented 1 year ago

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...

wrighter commented 1 year ago

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.

JonatannQm commented 1 year ago

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