Skip to content

On notebook import, line magics are rewritten without importing get_ipython() #3273

@joyceerhl

Description

@joyceerhl

Expected behaviour

When a user imports an existing .ipynb file, IPython magics such as %matplotlib inline are converted to get_ipython().run_line_magic('matplotlib', 'inline'). There should be a corresponding from IPython import get_ipython import statement.

Actual behaviour

We do not currently add a from IPython import get_ipython cell on import, so the linter complains about get_ipython() being an undefined variable.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions