Skip to content

Interfaces lack vfuncs #219

@jamiethecat

Description

@jamiethecat

I've noticed that with for example Gtk.Buildable or Gio.ListModel, I can't add typing.override to the vfuncs as they're not recognized in the stubs:

from typing import override

from gi.repository import Gio, GObject


class MyModel(GObject.Object, Gio.ListModel):
    @override
    def do_get_item(self, position): ...

    # Method "do_get_item" is marked as override, but no base method of same name is present (Pyright reportGeneralTypeIssues)

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