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

W606 false warning on consecutive await #811

Closed
wwwjfy opened this issue Oct 24, 2018 · 1 comment
Closed

W606 false warning on consecutive await #811

wwwjfy opened this issue Oct 24, 2018 · 1 comment

Comments

@wwwjfy
Copy link
Contributor

wwwjfy commented Oct 24, 2018

import asyncio


async def a():
    return 1


async def b():
    return a()


async def main():
    await (await b())


asyncio.run(main())

pycodestyle reports W606 'async' and 'await' are reserved keywords starting with Python 3.7, while this is not the case here.

Python 3.7

wwwjfy added a commit to wwwjfy/gino that referenced this issue Oct 24, 2018
pycodestyle which is contained in flake8 3.6.0 has an issue with syntax
`await (await async_func())`.
The issue was filed as PyCQA/pycodestyle#811
@scop
Copy link
Contributor

scop commented Oct 24, 2018

Another probably related reproducer:

foo = (await
       bar())

The line break after await is significant, no warning is issued without it.

scop added a commit to home-assistant/core that referenced this issue Oct 25, 2018
* Upgrade flake8 to 3.6.0

* flake8/pylint comment tweaks

* flake8 F841 fixes

* flake8 W605 fix

* Ignore pyflakes bug #373 false positives

PyCQA/pyflakes#373

* pycodestyle bug #811 workaround

PyCQA/pycodestyle#811
wwwjfy added a commit to wwwjfy/pycodestyle that referenced this issue Nov 24, 2018
wwwjfy added a commit to wwwjfy/pycodestyle that referenced this issue Nov 24, 2018
wwwjfy added a commit to wwwjfy/pycodestyle that referenced this issue Nov 24, 2018
wwwjfy added a commit to wwwjfy/pycodestyle that referenced this issue Nov 24, 2018
fantix pushed a commit to python-gino/gino that referenced this issue Dec 8, 2018
pycodestyle which is contained in flake8 3.6.0 has an issue with syntax
`await (await async_func())`.
The issue was filed as PyCQA/pycodestyle#811
cclauss added a commit to cclauss/lyanna that referenced this issue Jan 20, 2019
sigmavirus24 added a commit that referenced this issue Jan 23, 2019
fix #811, corner cases for async/await check
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

No branches or pull requests

2 participants