mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Stdlib: add 'obvious' default values (#9688)
This commit is contained in:
@@ -363,7 +363,7 @@ class GeneratorType(Generator[_T_co, _T_contra, _V_co]):
|
||||
self, __typ: type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
|
||||
) -> _T_co: ...
|
||||
@overload
|
||||
def throw(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
|
||||
@final
|
||||
class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]):
|
||||
@@ -379,7 +379,7 @@ class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]):
|
||||
self, __typ: type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
|
||||
) -> _T_co: ...
|
||||
@overload
|
||||
async def athrow(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
async def athrow(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
def aclose(self) -> Coroutine[Any, Any, None]: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __class_getitem__(cls, __item: Any) -> GenericAlias: ...
|
||||
@@ -402,7 +402,7 @@ class CoroutineType(Coroutine[_T_co, _T_contra, _V_co]):
|
||||
self, __typ: type[BaseException], __val: BaseException | object = ..., __tb: TracebackType | None = ...
|
||||
) -> _T_co: ...
|
||||
@overload
|
||||
def throw(self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = ...) -> _T_co: ...
|
||||
|
||||
class _StaticFunctionType:
|
||||
# Fictional type to correct the type of MethodType.__func__.
|
||||
|
||||
Reference in New Issue
Block a user