From 3ff87f704ab9084757883d94782b3c29e6d9d8de Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Sun, 17 May 2026 12:15:21 -0500 Subject: [PATCH] fix: `__get__` for `FunctionInfo` and `VFuncInfo` should return `Self` --- src/gi-stubs/_gi.pyi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gi-stubs/_gi.pyi b/src/gi-stubs/_gi.pyi index 1f33885f..68b2ae7c 100644 --- a/src/gi-stubs/_gi.pyi +++ b/src/gi-stubs/_gi.pyi @@ -158,7 +158,9 @@ class FunctionInfo(CallableInfo): def get_vfunc(self) -> VFuncInfo | None: ... def is_constructor(self) -> bool: ... def is_method(self) -> bool: ... - def __get__(self, instance: object, owner: object = None, /) -> Any: ... + def __get__( + self, instance: object, owner: type[object] | None = None, / + ) -> Self: ... class FunctionInfoFlags(int): IS_CONSTRUCTOR: ClassVar[int] @@ -545,7 +547,9 @@ class VFuncInfo(CallableInfo): def get_invoker(self) -> FunctionInfo | None: ... def get_offset(self) -> int: ... def get_signal(self) -> SignalInfo | None: ... - def __get__(self, instance: object, owner: object = None, /) -> Any: ... + def __get__( + self, instance: object, owner: type[object] | None = None, / + ) -> Self: ... class VFuncInfoFlags(int): CHAIN_UP: ClassVar[int]