8000 Improve various signatures that shouldn't be `async def`, but currently are by AlexWaygood · Pull Request #7491 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Improve various signatures that shouldn't be async def, but currently are #7491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 19, 2022
Prev Previous commit
Next Next commit
Improve comment
  • Loading branch information
AlexWaygood authored Mar 15, 2022
commit a25aa373daff5e3f935e5a2700f03df7dd10763a
5 changes: 3 additions & 2 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1076,8 +1076,9 @@ if sys.version_info >= (3, 10):
def __anext__(self) -> _AwaitableT_co: ...

@overload
# anext is not, in fact, an async function. When default is not provided
# anext is just a passthrough for obj.__anext__
# `anext` is not, in fact, an async function. When default is not provided
# `anext` is just a passthrough for `obj.__anext__`
# 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: ...
Expand Down
0