Incorrectly reports an "= " inside a f-string as 'unexpected token' #182
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Hello! I just noticed that Pylance accepts f-strings with an equal sign at the end such as
print(f"{10 + 20 =}")
But it will complain with "invalid token" if a space is added after the = sign. I found this out while refactoring a test today:
Environment data
Expected behaviour
Pylance should identify the space after an
=
sign as a valid tokenActual behaviour
It actually complains about the space
Logs
Python output logs as soon as I add the space and save:
Code Snippet / Additional information
The text was updated successfully, but these errors were encountered: