Issues with MSYS2 and PyGObject
Answered
I'm trying to use PyCharm (2021.1.3) in Win10 with MSYS2 and PyGObject. My code runs fine, but I have two issues in PyCharm: (1) I get warning messages for pretty much every class in Gtk, Gio, etc. saying "Unresolved attribute reference 'xxx' for class 'YYY'" (e.g. Unresolved attribute reference 'connect' for class 'Window'), and (2) I don't get any hints for methods/attributes in those same classes. I'm guessing that these two issues are related. I've tried invalidating the cache and restarting, but that didn't have any effect. I'm not sure what else to try.
Any ideas?
Please sign in to leave a comment.
Would it be possible to provide a minimal code sample that can be used for reproducing the issue?
In this example, win.connect() and win.show_all() are both flagged as "connect" and "show_all" being unresolved attributes.
I find it interesting that the Gtk.Window() constructor and the Gtk.main_quit callback are resolved fine, but the methods within the Window class are not.
Matt
Thanks!
It appears to be a known issue https://youtrack.jetbrains.com/issue/PY-39158, please vote for it and feel free to comment.