Skip to content
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

Remove trailing semicolons in notebook cells #11

Open
czwilling opened this issue Aug 29, 2019 · 3 comments
Open

Remove trailing semicolons in notebook cells #11

czwilling opened this issue Aug 29, 2019 · 3 comments

Comments

@czwilling
Copy link

It seems that black by default deletes trailing semicolons in notebook cells. As these are commonly used to suppress the output of the cells, this can be a bit annoying.
Is there any possibility to tell nb_black / black to change this behaviour?

I know that I can just write None in the last line of each python cell but this makes the code kind of ugly.

Thanks in advance and kind regards,
Carsten

@graingert
Copy link

so black_nb could strip all trailing whitespace and trailing ; before passing the code to black

then add 1 trailing ; if it removed any ;

@fingoldo
Copy link

fingoldo commented Apr 4, 2023

Indeed, I hate when the extension removes the semicolons that I put intentionally to hide garbage output from matplotlib charts. Any solution, please?

@MarcoGorelli
Copy link

I don't think this repo is maintained anymore, I'd suggest having a look at https://github.com/n8henrie/jupyter-black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants