pygobject-stubs icon indicating copy to clipboard operation
pygobject-stubs copied to clipboard

Generating Gtk3 stubs, leads to invalid python

Open lovetox opened this issue 1 year ago • 1 comments

I see this line in the code

xoptions=<flags GTK_EXPAND | GTK_FILL of type Gtk.AttachOptions>

which is not valid python

lovetox avatar Feb 11 '24 08:02 lovetox

The fail is here generate.py:491

        signature = str(inspect.signature(function))

This the output from python

>>> str(inspect.signature(Gtk.Table.attach))
'(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=<flags GTK_EXPAND | GTK_FILL of type Gtk.AttachOptions>, yoptions=<flags GTK_EXPAND | GTK_FILL of type Gtk.AttachOptions>, xpadding=0, ypadding=0)'

I think an override (like it's done right now) it's fine

matperc avatar Feb 17 '24 10:02 matperc