Use PEP 570 syntax in stdlib (#11250)

This commit is contained in:
Shantanu
2024-03-09 14:50:16 -08:00
committed by GitHub
parent 63737acac6
commit 470a13ab09
139 changed files with 2412 additions and 2371 deletions

View File

@@ -65,7 +65,7 @@ class _Call(tuple[Any, ...]):
from_kall: bool = True,
) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, __value: object) -> bool: ...
def __ne__(self, value: object, /) -> bool: ...
def __call__(self, *args: Any, **kwargs: Any) -> _Call: ...
def __getattr__(self, attr: str) -> Any: ...
def __getattribute__(self, attr: str) -> Any: ...
@@ -103,7 +103,7 @@ class NonCallableMock(Base, Any):
**kwargs: Any,
) -> Self: ...
else:
def __new__(__cls, *args: Any, **kw: Any) -> Self: ...
def __new__(cls, /, *args: Any, **kw: Any) -> Self: ...
def __init__(
self,
@@ -234,7 +234,7 @@ class _patch(Generic[_T]):
is_local: bool
def __enter__(self) -> _T: ...
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, /
) -> None: ...
def start(self) -> _T: ...
def stop(self) -> None: ...