You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version (and distribution if applicable, e.g. Anaconda): 3.12.7
python.analysis.indexing: true
python.analysis.typeCheckingMode: off
Code Snippet
a= (f'hellothere')
print(a)
Repro Steps
Type in the code snippet as-is into an empty .py file.
Observe the "Problems" window for warnings/issues raised
Expected behavior
Pylance should highlight the syntax error in the first line. When you run this script, Python throws the below error:
SyntaxError: unterminated f-string literal (detected at line 1)
Pylance should be able to catch this error. For example, I tried typing the same snippet into PyCharm Community Edition, and it correctly identifies the errors (see screenshot)
Actual behavior
Pylance does not report any problems with this code.
Logs
2025-01-29 15:12:34.565 [info] Send text to terminal: C:/Users/XXX/AppData/Local/Programs/Python/Python312/python.exe d:/Projects/XXX/Sandbox/test.py
The text was updated successfully, but these errors were encountered:
rchiodo
changed the title
Pylance does not catch SyntaxError: unterminated f-string literal
Pyright does not catch SyntaxError: unterminated f-string literal
Jan 29, 2025
Environment data
Code Snippet
Repro Steps
Expected behavior
Pylance should highlight the syntax error in the first line. When you run this script, Python throws the below error:
Pylance should be able to catch this error. For example, I tried typing the same snippet into PyCharm Community Edition, and it correctly identifies the errors (see screenshot)
Actual behavior
Pylance does not report any problems with this code.
Logs
The text was updated successfully, but these errors were encountered: