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

Methods of `Gtk.WidgetClass` that also exist on `Gtk.Widget` can not be used as class methods.

Open theCapypara opened this issue 10 months ago • 0 comments

Trying to call a Gtk.WidgetClass class method on something like Gtk.TextView raises a type error, because the generated typestubs make something like Gtk.WidgetClass.add_shortcut a method of Gtk.TextView, which is semi-correct. It's both a method on Gtk.Widget but also a class method of Gtk.WidgetClass which type[Gtk.TextView] should implement.

I haven't 100% checked if this a general incompatibility with Gtk.WidgetClass.

theCapypara avatar Apr 09 '24 19:04 theCapypara