Show me clear way to get code completion with PyGObject

I installed PyGObject fine. The code will run, but there is no code completion capability.

Did alt+enter with cursor caret inside Gtk in line below, but nothing happened.

from gi.repository import Gtk

Went to 'Help' menu >Edit Custom Properties; added idea.max.intellisense.filesize=25000

Redid alt+enter with cursor caret inside Gtk and popup had:

Convert to 'import gi.repository' >

Add alias to 'Gtk' >

......but got no 'Generate stubs for binary module'.

Is there some clear step by step procedure to get Pycharm to do code completion for PyGObject??


1 comment
Comment actions Permalink

After doing  'Help' menu >Edit Custom Properties; added idea.max.intellisense.filesize=25000, I did the following within the venv of PyCharm:

1- Started a new project

2- pip3 install pycairo

3- pip3 install PyGObject

Then everything worked fine as long as I DO NOT PERFORM THE PYCHARM SUGGESTION:

'Type hints are not installed'; They could make code insight better. Install 'PyGObject-stubs==0.0.2

It will cause things not to work!



Please sign in to leave a comment.