Skip to content
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

Incompatibility with PyCharm / VSC Pylance #16

Closed
MiloParigi opened this issue Sep 20, 2022 · 2 comments
Closed

Incompatibility with PyCharm / VSC Pylance #16

MiloParigi opened this issue Sep 20, 2022 · 2 comments

Comments

@MiloParigi
Copy link

Following the first issue of this repository #1, I've discovered that my import failures on Pycharm and VSC where coming from the editor themselves and not this package.

For reference, here are the opened tickets on the subject for PyCharm:

I was unable to locate similar issues for Pylance. If someone have it working in Visual, please let me know :)

As it seems unlikely that it will be fixed in the near future, would you accept a PR with a note on the IDEs current limitation and non implementation of PEP-561 in the 'Caveats' section of the package README ? It seems to me like a major pain point for users of this package, and something I would like to know before using it.

Thanks !

@henribru
Copy link
Owner

henribru commented Oct 9, 2022

There have been some changes to how this is handled since #1, so assuming you're on a recent version the reason it doesn't work now is slightly different. At least in VS Code's case, this is due to a bug in types-protobuf (which is a dependency of this package):
microsoft/pyright#2113
python/typeshed#5800

Unfortunately the fix for this was reverted. As a workaround for now you can either delete types-protobuf or remove the __init__.pyi file it erroneously adds: microsoft/pyright#2113 (comment). I've tested this and it seems to fix the issue both in VS Code and Pycharm. If you'd like to add those workarounds to the README I'll be happy to accept it.

@henribru
Copy link
Owner

This issue has been fixed with the release of types-protobuf 4.21.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants