Open
Description
If I have a cell with
flake8_version = !flake8 --version
flake8_version
, then this executes fine.
However, the equivalent Python representation of it from jupytext is:
# %%
flake8_version = !flake8 --version
flake8_version
which is invalid syntax (and not something I could run flake8
on 😄 )
I'm bringing this up because in #781 you commented
magic commands are always commented out by default
but this one wasn't commented out.
From a quick glance at the source code, it looks like magics are detected using regular expressions - have you considered using IPython's TransformerManager
and then ast-parsing instead? I'm happy to help out with this if you want greater support for magic detection (at least, in Python notebooks)
Metadata
Assignees
Labels
No labels
Activity