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 positive when selecting async function from list by index #936

Open
penn5 opened this issue May 16, 2020 · 0 comments
Open

W606: false positive when selecting async function from list by index #936

penn5 opened this issue May 16, 2020 · 0 comments

Comments

@penn5
Copy link

penn5 commented May 16, 2020

Using version 2.6.0 in a clean Docker container (python 3.8.2)

Code to reproduce:

import asyncio


async def a(p):
    print(p)


async def b():
    await [a][0]("hi")

if __name__ == "__main__":
    asyncio.run(b())

Output:

root@47c18858d18f:/app# python -m pycodestyle test.py
test.py:9:5: W606 'async' and 'await' are reserved keywords starting with Python 3.7
root@47c18858d18f:/app#

This appears similar to #811, which was also about false positives on W606.

@penn5 penn5 changed the title W606 false positive W606 false positive when selecting async function from list by index May 16, 2020
@asottile asottile changed the title W606 false positive when selecting async function from list by index W606: false positive when selecting async function from list by index Jun 14, 2020
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

1 participant