-
Notifications
You must be signed in to change notification settings - Fork 393
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
Black has syntax error with valid iPython magic when using --pipe #587
Comments
One other point is that the entire generated script appears to be commented (no non-ipython magic) so black was probably trying to parse it as a shebang! |
Oh I see... the regular expression at Line 43 in 213acee
is a bit too restrictive - you want to allow Would you like to propose a PR with
I am not sure to follow, can you give a MRE? Thanks! |
This diff has the faulty ipynb in it: facebookresearch/habitat-lab@a96e0f4 Archived in case that diff get's squashed This is the diff that fixed it: facebookresearch/habitat-lab@2ff9416 |
@mwouts I opened a PR that solves the issue. |
Thanks @Skylion007 for the fix. And for the notebook examples. Great project by the way! |
To reproduce:
This occurs on
black, version 19.10b0
and 'jupytext==1.5.2'. When --sync a notebook to py:percent format using the following command:I get this error:
Now I tracked down the error, and when I change the lines ipynb to use
!bash ~/miniconda.sh -b -p $HOME/miniconda
, it works just fine. Also the following lines also generated error:I also had to change:
!./test_locally_pointnav_rgbd.sh
to
!bash ./test_locally_pointnav_rgbd.sh
TLDR: Black has issues when the first arg following '!' isn't a command, but references an executable file or another bash alias.
The text was updated successfully, but these errors were encountered: