-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System assigns result in invalid syntax #816
Comments
Likewise for
|
Hi @MarcoGorelli , oh that's right there are so many magic commands... Is it correct that we have implemented support for Thanks also for pointing out to We can think a bit more about that. On the one hand, I must admit that the support for magic commands is error prone (the fanciest error being the one where variables named Also, maybe changing this for everyone would cause many diffs on existing notebooks. So maybe, if we do implement a version of the magic commands based on the |
Agreed - but you can keep the commented out magics using this approach. You just use In psf/black#2357 I replace the magics with randomly generated tokens, but they could just as easily be replaced with commented-out versions of themselves I'll put something together to demonstrate when I get a chance |
Thanks, that would be great! Alternatively if you have some documentation on the |
Other than the official does, I don't have any extra documentation (other than the docstrings in |
If I have a cell with
, then this executes fine.
However, the equivalent Python representation of it from jupytext is:
which is invalid syntax (and not something I could run
flake8
on 😄 )I'm bringing this up because in #781 you commented
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)The text was updated successfully, but these errors were encountered: