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
Add comment
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
  • Loading branch information
AlexWaygood and graingert authored Mar 15, 2022
commit e5d3697938e51cc3ecbb8f2ac2a73e00e657e7f8
2 changes: 2 additions & 0 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ 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__
def anext(__i: _SupportsSynchronousAnext[_AwaitableT]) -> _AwaitableT: ...
@overload
async def anext(__i: SupportsAnext[_T], default: _VT) -> _T | _VT: ...
Expand Down
0