Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 54447f6

Browse files
authored
Use type instead of Type in typing.pyi (#11235)
1 parent 56b0c8b commit 54447f6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

stdlib/typing.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ _VT = TypeVar("_VT") # Value type.
301301
_T_co = TypeVar("_T_co", covariant=True) # Any type covariant containers.
302302
_KT_co = TypeVar("_KT_co", covariant=True) # Key type covariant containers.
303303
_VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers.
304-
_TC = TypeVar("_TC", bound=Type[object])
304+
_TC = TypeVar("_TC", bound=type[object])
305305

306306
def no_type_check(arg: _F) -> _F: ...
307307
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
@@ -418,7 +418,7 @@ class Generator(Iterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra, _Return
418418
@overload
419419
@abstractmethod
420420
def throw(
421-
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
421+
self, __typ: type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
422422
) -> _YieldT_co: ...
423423
@overload
424424
@abstractmethod
@@ -455,7 +455,7 @@ class Coroutine(Awaitable[_ReturnT_co], Generic[_YieldT_co, _SendT_contra, _Retu
455455
@overload
456456
@abstractmethod
457457
def throw(
458-
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
458+
self, __typ: type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
459459
) -> _YieldT_co: ...
460460
@overload
461461
@abstractmethod
@@ -491,7 +491,7 @@ class AsyncGenerator(AsyncIterator[_YieldT_co], Generic[_YieldT_co, _SendT_contr
491491
@overload
492492
@abstractmethod
493493
def athrow(
494-
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
494+
self, __typ: type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
495495
) -> Awaitable[_YieldT_co]: ...
496496
@overload
497497
@abstractmethod
@@ -772,7 +772,7 @@ class IO(Iterator[AnyStr]):
772772
def __enter__(self) -> IO[AnyStr]: ...
773773
@abstractmethod
774774
def __exit__(
775-
self, __type: Type[BaseException] | None, __value: BaseException | None, __traceback: TracebackType | None
775+
self, __type: type[BaseException] | None, __value: BaseException | None, __traceback: TracebackType | None
776776
) -> None: ...
777777

778778
class BinaryIO(IO[bytes]):
@@ -840,7 +840,7 @@ if sys.version_info >= (3, 8):
840840
def get_origin(tp: Any) -> Any | None: ...
841841

842842
@overload
843-
def cast(typ: Type[_T], val: Any) -> _T: ...
843+
def cast(typ: type[_T], val: Any) -> _T: ...
844844
@overload
845845
def cast(typ: str, val: Any) -> Any: ...
846846
@overload

0 commit comments

Comments
 (0)