mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
stdlib: fix signatures for some functions with unrepresentable defaults (#11000)
Found with python/mypy#16433 Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1288,7 +1288,7 @@ if sys.version_info >= (3, 10):
|
||||
# See discussion in #7491 and pure-Python implementation of `anext` at https://github.com/python/cpython/blob/ea786a882b9ed4261eafabad6011bc7ef3b5bf94/Lib/test/test_asyncgen.py#L52-L80
|
||||
def anext(__i: _SupportsSynchronousAnext[_AwaitableT]) -> _AwaitableT: ...
|
||||
@overload
|
||||
async def anext(__i: SupportsAnext[_T], default: _VT) -> _T | _VT: ...
|
||||
async def anext(__i: SupportsAnext[_T], __default: _VT) -> _T | _VT: ...
|
||||
|
||||
# compile() returns a CodeType, unless the flags argument includes PyCF_ONLY_AST (=1024),
|
||||
# in which case it returns ast.AST. We have overloads for flag 0 (the default) and for
|
||||
|
||||
Reference in New Issue
Block a user