Skip to content

Gtk.NoSelection.__init__ incorrectly typed #131

@demberto

Description

@demberto

Gtk.NoSelection.__init__

https://github.com/pygobject/pygobject-stubs/blob/master/src/gi-stubs/repository/_Gtk4.pyi#L10709

Actual error

model=Gtk.NoSelection(Gtk.StringList.new(["A", "B", "C"])),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

Solution

Use Gtk.NoSelection.new (very weird API bindings)

Version info

  • GObject: 3.44.1
  • pygobject-stubs: 2.7.0
  • Gtk: 4.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions