Skip to content

Problem with indentation in the run_cell method #11594

@grumpfou

Description

@grumpfou

Hi,

When using the InteractiveShell method run_cell, there is a problem when the string to execute begins with a line that contains only 4 spaces. It then does not handle properly the indentations of the subsequent loops.
image

Tested on JupyterNotebook, JupyterLab and the Ipython interactive shell in the terminal.

Config:

  • jupyter --version 4.4.0
  • ipython --version 7.0.1
  • python3 --version Python 3.6.7
  • Ubuntu 18.04.1 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions