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

Bug: Jupyter Notebook trim whitespaces not working in code cells #181905

Closed
hegerdes opened this issue May 9, 2023 · 3 comments · Fixed by #192941
Closed

Bug: Jupyter Notebook trim whitespaces not working in code cells #181905

hegerdes opened this issue May 9, 2023 · 3 comments · Fixed by #192941
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) on-testplan

Comments

@hegerdes
Copy link

hegerdes commented May 9, 2023

Does this issue occur when all extensions are disabled?: Yes
Note: All extensions disabled - except python and jupyter notebook

The function to trim whitespaces does not work in jupyter notebook code cells

  • VS Code Version: 1.78.0 (252e546) - x64
  • OS Version: Win 11 Pro

Steps to Reproduce:

  1. Create a new Jupyter Notebook (.ipynb) file
  2. Create a cell and put some code with tailing whitespaces and empty lines in it

Example:
image

@hegerdes hegerdes changed the title Jupyter Notebook trim whitespaces not working in code cells Bug: Jupyter Notebook trim whitespaces not working in code cells May 9, 2023
@rebornix rebornix added feature-request Request for new features or functionality notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) labels May 9, 2023
@rebornix rebornix assigned Yoyokrazy and unassigned Yoyokrazy May 9, 2023
@rebornix rebornix added this to the May 2023 milestone May 9, 2023
@rebornix rebornix modified the milestones: May 2023, June 2023 May 31, 2023
@rebornix
Copy link
Member

rebornix commented Jun 9, 2023

It seems I can't reproduce in latest VS Code

Screen.Recording.2023-06-09.at.11.37.10.AM.mov

@hegerdes can you please check if you can reproduce with all extensions disabled and also check if there is modified editor.trimAutoWhitespace setting in user setting or workspace.

@rebornix rebornix added ~info-needed Issue requires more information from poster (with bot comment) and removed feature-request Request for new features or functionality labels Jun 9, 2023
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot added info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Jun 9, 2023
@hegerdes
Copy link
Author

@rebornix Thanks for your reply. I noticed that there was an update for VSCode formatting for notebooks, but it did not fix my issue. Thanks to your reply I also noticed that there are different trim settings: editor.trimAutoWhitespace and files.trimTrailingWhitespace. Both are set to true on my side. All extensions disabled.

What does not seem to work is the trimTrailingWhitespace part. Whitespaces on the end of the line and empty lines with whitespaces are not cleared. I created a short video for demonstration. See line 7,9 and 13.

Unbenanntes.Video.mp4

I hope that helps differentiating the problem

@rebornix rebornix added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Jun 28, 2023
@rebornix rebornix modified the milestones: June 2023, Backlog Jun 28, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 18, 2023
@rzhao271 rzhao271 removed this from the Backlog milestone Sep 25, 2023
@rzhao271 rzhao271 added this to the September 2023 milestone Sep 25, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders notebook-cell-editor Bugs related to code editors in Notebooks (not intellisense / LS's) on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants