mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-16 03:24:54 +08:00
Use lowercase type everywhere (#6853)
This commit is contained in:
@@ -14,7 +14,6 @@ from typing import (
|
||||
Iterator,
|
||||
Optional,
|
||||
Protocol,
|
||||
Type,
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
@@ -32,7 +31,7 @@ _T_io = TypeVar("_T_io", bound=Optional[IO[str]])
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
_ExitFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool]
|
||||
_ExitFunc = Callable[[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]], bool]
|
||||
_CM_EF = TypeVar("_CM_EF", AbstractContextManager[Any], _ExitFunc)
|
||||
|
||||
class ContextDecorator:
|
||||
@@ -90,9 +89,9 @@ if sys.version_info >= (3, 10):
|
||||
def __init__(self, thing: _SupportsAcloseT) -> None: ...
|
||||
|
||||
class suppress(AbstractContextManager[None]):
|
||||
def __init__(self, *exceptions: Type[BaseException]) -> None: ...
|
||||
def __init__(self, *exceptions: type[BaseException]) -> None: ...
|
||||
def __exit__(
|
||||
self, exctype: Type[BaseException] | None, excinst: BaseException | None, exctb: TracebackType | None
|
||||
self, exctype: type[BaseException] | None, excinst: BaseException | None, exctb: TracebackType | None
|
||||
) -> bool: ...
|
||||
|
||||
class redirect_stdout(AbstractContextManager[_T_io]):
|
||||
@@ -110,11 +109,11 @@ class ExitStack(AbstractContextManager[ExitStack]):
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, __exc_type: Type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
|
||||
self, __exc_type: type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
|
||||
) -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
_ExitCoroFunc = Callable[[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]], Awaitable[bool]]
|
||||
_ExitCoroFunc = Callable[[Optional[type[BaseException]], Optional[BaseException], Optional[TracebackType]], Awaitable[bool]]
|
||||
_CallbackCoroFunc = Callable[..., Awaitable[Any]]
|
||||
_ACM_EF = TypeVar("_ACM_EF", AbstractAsyncContextManager[Any], _ExitCoroFunc)
|
||||
class AsyncExitStack(AbstractAsyncContextManager[AsyncExitStack]):
|
||||
@@ -129,7 +128,7 @@ if sys.version_info >= (3, 7):
|
||||
def aclose(self) -> Awaitable[None]: ...
|
||||
def __aenter__(self: Self) -> Awaitable[Self]: ...
|
||||
def __aexit__(
|
||||
self, __exc_type: Type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
|
||||
self, __exc_type: type[BaseException] | None, __exc_value: BaseException | None, __traceback: TracebackType | None
|
||||
) -> Awaitable[bool]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
|
||||
Reference in New Issue
Block a user