Skip to content

Disallow assignments to awaited coroutines that do not return #12853

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 2 commits into from
May 25, 2022

Conversation

hauntsaninja
Copy link
Collaborator

Resolves #12837

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

tornado (https://github.com/tornadoweb/tornado)
+ tornado/web.py:1687: error: Function does not return a value

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_app.py:381: error: Function does not return a value  [func-returns-value]

@python python deleted a comment from github-actions bot May 24, 2022
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Looks good. It should reduce confusion if async and non-async functions behave more consistently.

@JukkaL JukkaL merged commit 87e73fe into python:master May 25, 2022
@hauntsaninja hauntsaninja deleted the async-none branch May 28, 2022 08:45
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.

mypy does not complain about async functions that do not return values
2 participants