PyCharm can not resolve PyGObject 3.0, but code runs fine
Position the text cursor inside the redlined Gtk
in:
from gi.repository import Gtk
hit Alt + Enter and choose "Generate stubs for binary module"
In Gtk+ 3 Python bindings to binary modules are generated dynamically using *.typelib
databases. The dynamic importer for accessing all the modules is located in gi.repository
. PyCharm cannot detect these modules using its code insight, because they require special handling.
I've filed a feature request for this issue: PY-6932. Feel free to vote for it.