stdlib: Add defaults for positional-only parameters (#9655)

This commit is contained in:
Alex Waygood
2023-02-01 21:44:08 +00:00
committed by GitHub
parent 35172c7aab
commit 1d7dda7fa1
30 changed files with 159 additions and 155 deletions

View File

@@ -362,11 +362,11 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@overload
@abstractmethod
def throw(
self, __typ: Type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
) -> _T_co: ...
@overload
@abstractmethod
def throw(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> _T_co: ...
def close(self) -> None: ...
def __iter__(self) -> Generator[_T_co, _T_contra, _V_co]: ...
@property
@@ -399,11 +399,11 @@ class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
@overload
@abstractmethod
def throw(
self, __typ: Type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
) -> _T_co: ...
@overload
@abstractmethod
def throw(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> _T_co: ...
@abstractmethod
def close(self) -> None: ...
@@ -432,11 +432,11 @@ class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]):
@overload
@abstractmethod
def athrow(
self, __typ: Type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None
) -> Awaitable[_T_co]: ...
@overload
@abstractmethod
def athrow(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> Awaitable[_T_co]: ...
def athrow(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> Awaitable[_T_co]: ...
def aclose(self) -> Awaitable[None]: ...
@property
def ag_await(self) -> Any: ...
@@ -664,21 +664,21 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
@abstractmethod
def isatty(self) -> bool: ...
@abstractmethod
def read(self, __n: int = ...) -> AnyStr: ...
def read(self, __n: int = -1) -> AnyStr: ...
@abstractmethod
def readable(self) -> bool: ...
@abstractmethod
def readline(self, __limit: int = ...) -> AnyStr: ...
def readline(self, __limit: int = -1) -> AnyStr: ...
@abstractmethod
def readlines(self, __hint: int = ...) -> list[AnyStr]: ...
def readlines(self, __hint: int = -1) -> list[AnyStr]: ...
@abstractmethod
def seek(self, __offset: int, __whence: int = ...) -> int: ...
def seek(self, __offset: int, __whence: int = 0) -> int: ...
@abstractmethod
def seekable(self) -> bool: ...
@abstractmethod
def tell(self) -> int: ...
@abstractmethod
def truncate(self, __size: int | None = ...) -> int: ...
def truncate(self, __size: int | None = None) -> int: ...
@abstractmethod
def writable(self) -> bool: ...
@abstractmethod