Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions stdlib/functools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ class partial(Generic[_T]):
def keywords(self) -> dict[str, Any]: ...
def __new__(cls, func: Callable[..., _T], /, *args: Any, **kwargs: Any) -> Self: ...
def __call__(self, /, *args: Any, **kwargs: Any) -> _T: ...
if sys.version_info >= (3, 14):
def __get__(self, instance: Any, owner: type[Any] | None = None, /) -> Callable[..., _T]: ...

def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...

# With protocols, this could change into a generic protocol that defines __get__ and returns _T
Expand Down
4 changes: 2 additions & 2 deletions stubs/boltons/boltons/funcutils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ def copy_function(orig, copy_dict: bool = True): ...
def partial_ordering(cls): ...

class InstancePartial(functools.partial[Incomplete]):
def __get__(self, obj, obj_type): ...
def __get__(self, obj, obj_type): ... # type: ignore[override]

class CachedInstancePartial(functools.partial[Incomplete]):
__name__: Incomplete
def __set_name__(self, obj_type, name) -> None: ...
__doc__: Incomplete
__module__: Incomplete
def __get__(self, obj, obj_type): ...
def __get__(self, obj, obj_type): ... # type: ignore[override]

partial = CachedInstancePartial

Expand Down
Loading