pygobject-stubs
pygobject-stubs copied to clipboard
PEP 561 Typing Stubs for PyGObject
Right now we hint all the callables that admits variable arguments as `Callable[..., T]`. Starting from python 3.10 we can use the combination of `Concatenate` and `ParamSpec`. [Link to documentation.](https://docs.python.org/3/library/typing.html#typing.Concatenate)...
### `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...
After I did: pip install pygobject-stubs --no-cache-dir --config-settings=config=Gtk4,Gdk4,Soup3 (for gtk4), or just the default install(pip install pygobject-stubs pygobject), my vim still reports above warning, it runs, but the warning stays...
https://github.com/pygobject/pygobject-stubs?tab=readme-ov-file#project-integration Readme mentions using the requirements.txt file as it supports `config-settings`. It could also provide an example of such configuration.