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

@@ -225,10 +225,10 @@ def isasyncgenfunction(obj: Callable[_P, Any]) -> TypeGuard[Callable[_P, AsyncGe
def isasyncgenfunction(obj: object) -> TypeGuard[Callable[..., AsyncGeneratorType[Any, Any]]]: ...
class _SupportsSet(Protocol[_T_cont, _V_cont]):
def __set__(self, __instance: _T_cont, __value: _V_cont) -> None: ...
def __set__(self, instance: _T_cont, value: _V_cont, /) -> None: ...
class _SupportsDelete(Protocol[_T_cont]):
def __delete__(self, __instance: _T_cont) -> None: ...
def __delete__(self, instance: _T_cont, /) -> None: ...
def isasyncgen(object: object) -> TypeGuard[AsyncGeneratorType[Any, Any]]: ...
def istraceback(object: object) -> TypeGuard[TracebackType]: ...
@@ -482,7 +482,7 @@ def formatargvalues(
formatvalue: Callable[[Any], str] | None = ...,
) -> str: ...
def getmro(cls: type) -> tuple[type, ...]: ...
def getcallargs(__func: Callable[_P, Any], *args: _P.args, **kwds: _P.kwargs) -> dict[str, Any]: ...
def getcallargs(func: Callable[_P, Any], /, *args: _P.args, **kwds: _P.kwargs) -> dict[str, Any]: ...
class ClosureVars(NamedTuple):
nonlocals: Mapping[str, Any]