Skip to content

Multiline cell magics with %% prefix fail #3672

@Najsztub

Description

@Najsztub

Environment data

  • VS Code version: 1.30.2
  • Extension version (available under the Extensions sidebar): 2018.12.1
  • OS and version: Linux x64 4.20.1-1-MANJARO
  • Python version: 3.7.12
  • Type of virtual environment used: virtualenv

Expected behaviour

I can normally execute single line % magic commands in the Python Interactive window.
I would like to do the same using cell magic with %% prefix in my cell.

przechwycenie obrazu ekranu_2019-01-20_13-38-33

Actual behaviour

In VSCode I get a SyntaxError.

przechwycenie obrazu ekranu_2019-01-20_13-26-16

Steps to reproduce:

Try to execute a cell with %% magic:

#%%
%%timeit 
L = [n ** 2 for n in range(100)]

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions