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

Syntax coloring bug #591

Closed
songyang-dev opened this issue Nov 9, 2020 · 5 comments
Closed

Syntax coloring bug #591

songyang-dev opened this issue Nov 9, 2020 · 5 comments
Assignees
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@songyang-dev
Copy link

The syntax coloring for the Python language in VSCode has a subtle bug. The inner closing parenthesis has the same color as its elements, which is wrong. See the attached screenshot for reference. The bug is right after finished_queuing.

Environment data

Version: 1.51.0 (user setup)
Commit: fcac248b077b55bae4ba5bab613fd6e9156c2f0c
Date: 2020-11-05T18:18:23.642Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.5 64-bit (conda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Value of the python.languageServer setting: Pylance

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Open a Python scripts and type the following
finished_queuing = Event()
threading.Thread(target=labels_dumper, args=(finished_queuing)).start()
return finished_queuing
  1. You'll see a syntax discoloring on the closing parenthesis for args=

Logs

image

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Nov 10, 2020
@judej judej added the bug Something isn't working label Nov 10, 2020
@github-actions github-actions bot removed the triage label Nov 10, 2020
@jakebailey
Copy link
Member

This appears to have changed since being reported, now the both parens are a part of the arg:

image

@songyang-dev
Copy link
Author

Cool! I'll close this issue. If the problem comes back, feel free to re-open it! 👍

@jakebailey
Copy link
Member

I don't think the bug is gone, just changed. I don't believe we should be highlighting parens like this... Note how we don't mark the other parens as blue when they are in a call expression, for example.

@cdce8p
Copy link

cdce8p commented Mar 12, 2021

This seems to also apply to type annotations.

Screen Shot 2021-03-12 at 12 02 43

I'm aware that the parentheses aren't necessary here. Just though it might be helpful to know.

@jakebailey jakebailey added the needs investigation Could be an issue - needs investigation label Sep 1, 2021
@judej judej assigned judej and bschnurr and unassigned judej Sep 1, 2021
@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Sep 16, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.9.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202192-16-september-2021

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

6 participants