pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Cell magics not properly handled in VS.Code Jupyter

Open timoklimmer opened this issue 2 years ago • 0 comments

Environment data

  • Language Server version: v2022.9.10
  • OS and version: Windows 11, Ubuntu 20.04
  • Python version: Python 3.10.5, conda 4.14.0

Repro Steps

  1. Create a Jupyter notebook in VS.Code
  2. Start a cell with a cells magic, for example %%cmd.
  3. Add some arbitrary code to the next lines.

Expected behavior

Whenever a cell's content starts with a cells magic (%%...), the code in the cell is not validated as Python code, and no wrong and disturbing squiggles are shown.

Ignoring all cell content when the cell starts with a %% seems like a good first step.

Actual behavior

Wrong and disturbing squiggles, making a convenient use of cell magics in VS.Code Jupyter impossible.

image

@debonte fyi See also #2582

timoklimmer avatar Sep 13 '22 17:09 timoklimmer