Skip to content
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

Make AsyncGeneratorType.aclose() properly return Awaitable[None] #3032

Merged
merged 1 commit into from
Jun 5, 2019
Merged

Make AsyncGeneratorType.aclose() properly return Awaitable[None] #3032

merged 1 commit into from
Jun 5, 2019

Conversation

elradu
Copy link
Contributor

@elradu elradu commented Jun 4, 2019

It seems changing for AsyncGeneratorType as well was omitted when closing #2785

Signed-off-by: Radu Matei Lacraru rml97@fb.com

It seems changing for `AsyncGeneratorType` as well was omitted when closing #2785

Signed-off-by: Radu Matei Lacraru <rml97@fb.com>
@elradu
Copy link
Contributor Author

elradu commented Jun 4, 2019

from typing import AsyncGenerator


async def a() -> AsyncGenerator[int, None]:
    yield 1


reveal_type(a().aclose)

mypy example.py yields:

example.py:8: error: Revealed type is 'def () -> typing.Awaitable[builtins.int*]'

mypy --custom-typeshed ~/typeshed example.py yields:

example.py:8: error: Revealed type is 'def () -> typing.Awaitable[None]'

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit a778515 into python:master Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants