Skip to content
Merged
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
10 changes: 5 additions & 5 deletions stdlib/inspect.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ from typing import (
overload,
type_check_only,
)
from typing_extensions import Self, TypeIs, deprecated, disjoint_base
from typing_extensions import Never, Self, TypeIs, deprecated, disjoint_base

if sys.version_info >= (3, 14):
from annotationlib import Format
Expand Down Expand Up @@ -217,7 +217,7 @@ if sys.version_info >= (3, 11):

def getmodulename(path: StrPath) -> str | None: ...
def ismodule(object: object) -> TypeIs[ModuleType]: ...
def isclass(object: object) -> TypeIs[type[Any]]: ...
def isclass(object: object) -> TypeIs[type[object]]: ...
def ismethod(object: object) -> TypeIs[MethodType]: ...

if sys.version_info >= (3, 14):
Expand Down Expand Up @@ -245,7 +245,7 @@ def iscoroutinefunction(obj: Callable[_P, object]) -> TypeGuard[Callable[_P, Cor
@overload
def iscoroutinefunction(obj: object) -> TypeGuard[Callable[..., CoroutineType[Any, Any, Any]]]: ...

def isgenerator(object: object) -> TypeIs[GeneratorType[Any, Any, Any]]: ...
def isgenerator(object: object) -> TypeIs[GeneratorType[object, Never, object]]: ...
def iscoroutine(object: object) -> TypeIs[CoroutineType[Any, Any, Any]]: ...
def isawaitable(object: object) -> TypeIs[Awaitable[Any]]: ...

Expand All @@ -264,7 +264,7 @@ class _SupportsSet(Protocol[_T_contra, _V_contra]):
class _SupportsDelete(Protocol[_T_contra]):
def __delete__(self, instance: _T_contra, /) -> None: ...

def isasyncgen(object: object) -> TypeIs[AsyncGeneratorType[Any, Any]]: ...
def isasyncgen(object: object) -> TypeIs[AsyncGeneratorType[object, Never]]: ...
def istraceback(object: object) -> TypeIs[TracebackType]: ...
def isframe(object: object) -> TypeIs[FrameType]: ...
def iscode(object: object) -> TypeIs[CodeType]: ...
Expand All @@ -289,7 +289,7 @@ def ismethoddescriptor(object: object) -> TypeIs[MethodDescriptorType]: ...
def ismemberdescriptor(object: object) -> TypeIs[MemberDescriptorType]: ...
def isabstract(object: object) -> bool: ...
def isgetsetdescriptor(object: object) -> TypeIs[GetSetDescriptorType]: ...
def isdatadescriptor(object: object) -> TypeIs[_SupportsSet[Any, Any] | _SupportsDelete[Any]]: ...
def isdatadescriptor(object: object) -> TypeIs[_SupportsSet[Never, Never] | _SupportsDelete[Never]]: ...

#
# Retrieving source code
Expand Down
Loading