KEMBAR78
Disallow assignments to awaited coroutines that do not return by hauntsaninja · Pull Request #12853 · python/mypy · GitHub
Skip to content

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