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

Trailing semi-colon removed after formatting a Jupyter Notebook #515

Closed
vimchun opened this issue May 27, 2024 · 2 comments
Closed

Trailing semi-colon removed after formatting a Jupyter Notebook #515

vimchun opened this issue May 27, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.

Comments

@vimchun
Copy link

vimchun commented May 27, 2024

Hello,

First, thank you for this awesome extension which makes life much easier, and I am sorry if there is another opened issue about this.

My issue is the same as that one : #188 (which is closed)

On my Jupyter Notebook, triggering formatting with Black will remove the trailing semi-colon.

For example, on a Python cell with : plt.show();, the black extension commands would remove the trailing whitespace which has a meaning on Jupyter Notebook.

Reproduced on v2024.3.11371020 (pre-release) and v2024.2.0 ms-python.black-formatter versions (vscode 1.89.1).

Note the trailing semi-colons are not removed if I format my notebook with the black package in command line (without using ms-python.black-formatter), but it is less convenient (v24.4.2).

Is this supposed to be fixed ? (as the above issue was closed)

Or is there a workaround that can be done on the settings.json ?

Thank you for your reply.

@vimchun vimchun added the bug Issue identified by VS Code Team member as probable bug label May 27, 2024
@github-actions github-actions bot added the triage-needed Issue is not triaged. label May 27, 2024
@karthiknadig karthiknadig self-assigned this May 28, 2024
@karthiknadig
Copy link
Member

This should get addressed as a part of #87 Closing this against that.

You can also give Ruff Extension a try. It has better support for Jupyter Notebooks and it implements black formatter.

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Jun 12, 2024
@vimchun
Copy link
Author

vimchun commented Jun 15, 2024

Thanks @karthiknadig you are right, Ruff Extension does not have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

2 participants