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

Erroneous flagging of parentheses in "with (await ...)" statement in Python 3.6, 3.7 and 3.8; valid parentheses are flagged #1670

Closed
lromanov opened this issue Aug 13, 2021 · 3 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@lromanov
Copy link

Environment data

  • Language Server version: Pylance 2021.8.1
  • OS and version: macOS Big Sur
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.11

Expected behaviour

No red underlining; this is valid code in Python 3.6

Actual behaviour

image

Logs

No logs

Code Snippet / Additional information

import asyncio

async def main():
    with (await asyncio.Lock()):
        print('exit')

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()

Similar bug has been fixed in #999, but async/await case is still here.

@erictraut
Copy link
Contributor

Thanks for the bug report. I've confirmed this is a bug, and I'll work on a fix.

@erictraut
Copy link
Contributor

This will be fixed in the next release.

@erictraut erictraut added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Aug 20, 2021
@heejaechang
Copy link
Contributor

the fix is in 2021.8.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants