-
Notifications
You must be signed in to change notification settings - Fork 294
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
"Expected expression" for IPython shell commands in interactive file #5800
Comments
Related of #1497 |
This is actually about intellisense in a python file, not a notebook. |
Although the same problem happens in a notebook. Didn't realize shell commands can be anywhere in the line. |
This is still an issue today. Anyone has a quick fix for this? |
@CGMossa sorry there is no quick fix. This is not valid python syntax so pylance doesn't recognize it. It's likely going to be a while before pylance supports IPython parsing in python files. |
Duplicate of #8062 |
When using the interactive mode in Python files with the
# %%
syntax, if you use something likedf = !df
, you get an error on the line saying that it expected an expression. However, executing the cell seems to work perfectly fine:I'm not entirely sure if I should open this in the Python extension's repository, but since it's related to IPython I figured maybe I would start here (happy to move this to vscode-python if this isn't this extensions' "responsibility").
Environment data
Expected behaviour
The expression should be parsed fine, since it's a valid expression in IPython (and accepted by Jupyter in the output)
Actual behaviour
Error is shown in the editor.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
df = !df
in an interactive Python fileLogs
Output for
Jupyter
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toJupyter
)The text was updated successfully, but these errors were encountered: