@@ -26,7 +26,7 @@ from types import (
2626 WrapperDescriptorType ,
2727)
2828from typing import Any , ClassVar , Final , Literal , NamedTuple , Protocol , TypeVar , overload , type_check_only
29- from typing_extensions import ParamSpec , Self , TypeAlias , TypeGuard , TypeIs , deprecated , disjoint_base
29+ from typing_extensions import Never , ParamSpec , Self , TypeAlias , TypeGuard , TypeIs , deprecated , disjoint_base
3030
3131if sys .version_info >= (3 , 14 ):
3232 from annotationlib import Format
@@ -205,7 +205,7 @@ if sys.version_info >= (3, 11):
205205
206206def getmodulename (path : StrPath ) -> str | None : ...
207207def ismodule (object : object ) -> TypeIs [ModuleType ]: ...
208- def isclass (object : object ) -> TypeIs [type [Any ]]: ...
208+ def isclass (object : object ) -> TypeIs [type [object ]]: ...
209209def ismethod (object : object ) -> TypeIs [MethodType ]: ...
210210
211211if sys .version_info >= (3 , 14 ):
@@ -231,9 +231,9 @@ def iscoroutinefunction(obj: Callable[_P, Awaitable[_T]]) -> TypeGuard[Callable[
231231def iscoroutinefunction (obj : Callable [_P , object ]) -> TypeGuard [Callable [_P , CoroutineType [Any , Any , Any ]]]: ...
232232@overload
233233def iscoroutinefunction (obj : object ) -> TypeGuard [Callable [..., CoroutineType [Any , Any , Any ]]]: ...
234- def isgenerator (object : object ) -> TypeIs [GeneratorType [Any , Any , Any ]]: ...
235- def iscoroutine (object : object ) -> TypeIs [CoroutineType [Any , Any , Any ]]: ...
236- def isawaitable (object : object ) -> TypeIs [Awaitable [Any ]]: ...
234+ def isgenerator (object : object ) -> TypeIs [GeneratorType [object , Never , object ]]: ...
235+ def iscoroutine (object : object ) -> TypeIs [CoroutineType [object , Never , object ]]: ...
236+ def isawaitable (object : object ) -> TypeIs [Awaitable [object ]]: ...
237237@overload
238238def isasyncgenfunction (obj : Callable [..., AsyncGenerator [Any , Any ]]) -> bool : ...
239239@overload
@@ -248,7 +248,7 @@ class _SupportsSet(Protocol[_T_contra, _V_contra]):
248248class _SupportsDelete (Protocol [_T_contra ]):
249249 def __delete__ (self , instance : _T_contra , / ) -> None : ...
250250
251- def isasyncgen (object : object ) -> TypeIs [AsyncGeneratorType [Any , Any ]]: ...
251+ def isasyncgen (object : object ) -> TypeIs [AsyncGeneratorType [object , Never ]]: ...
252252def istraceback (object : object ) -> TypeIs [TracebackType ]: ...
253253def isframe (object : object ) -> TypeIs [FrameType ]: ...
254254def iscode (object : object ) -> TypeIs [CodeType ]: ...
@@ -273,7 +273,7 @@ def ismethoddescriptor(object: object) -> TypeIs[MethodDescriptorType]: ...
273273def ismemberdescriptor (object : object ) -> TypeIs [MemberDescriptorType ]: ...
274274def isabstract (object : object ) -> bool : ...
275275def isgetsetdescriptor (object : object ) -> TypeIs [GetSetDescriptorType ]: ...
276- def isdatadescriptor (object : object ) -> TypeIs [_SupportsSet [Any , Any ] | _SupportsDelete [Any ]]: ...
276+ def isdatadescriptor (object : object ) -> TypeIs [_SupportsSet [Never , Never ] | _SupportsDelete [Never ]]: ...
277277
278278#
279279# Retrieving source code
0 commit comments