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

python string syntax highlight errors #245

Open
alexr00 opened this issue Nov 24, 2021 · 2 comments
Open

python string syntax highlight errors #245

alexr00 opened this issue Nov 24, 2021 · 2 comments

Comments

@alexr00
Copy link

alexr00 commented Nov 24, 2021

  • Editor name and version: VS Code 1.62+

  • Platform: Any

  • Color scheme: Any

  • MagicPython version: latest commit from main

  • A sreenshot:
    image

  • 5-10 lines of surrounding code:

# This is not an f-string, but VSCode highlights `workspaceFolder' like a variable.
a = "${workspaceFolder}"

Originally filed by @mikisama in microsoft/vscode#137694

@SyzenEinca
Copy link

This is for the .format() method, I think?
like:

a = "{key}".format(key="something")

@mikisama
Copy link

This is for the .format() method, I think? like:

a = "{key}".format(key="something")

Hi, @SyzenEinca
It's not for the .format() method.
I use python to generate some configuration.
Then I found this python string syntax highlight errors.

paths = [
    'OLD_PREFIX/include',
    'OLD_PREFIX/inc',
]

paths = [i.replace('OLD_PREFIX', '${workspaceFolder}') for i in paths]

print(paths)

image

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

3 participants