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

Test: Notebooks -- Format on Cell Execution #183821

Closed
3 tasks done
Yoyokrazy opened this issue May 30, 2023 · 1 comment
Closed
3 tasks done

Test: Notebooks -- Format on Cell Execution #183821

Yoyokrazy opened this issue May 30, 2023 · 1 comment

Comments

@Yoyokrazy
Copy link
Contributor

Yoyokrazy commented May 30, 2023

Refs: #7058

Complexity: 2

Authors: @Yoyokrazy


Summary:

Notebooks now can format cells upon cell execution. This will trigger using run cell, run all, run above/below, and combined kernel+run commands.

Steps to Test:

  • Create a new or open a pre-existing notebook
    • Create a code cell(s) with some formatting issues (extra spaces in variable declaration, tons of empty lines, etc)
  • Go to Settings (UI) and search for notebook.formatOnCellExecution, enable this setting
  • Make sure you have a formatter available for Python (I use Black)
  • Try using run cell, run all, run above, or run below -- ensure formatting is correct

Things to check

  • When running cells, they format as expected
  • The cell(s) executed as expected
@eleanorjboyd
Copy link
Member

looks great- tested both on an unsaved notebook and a saved / named notebook. Also control-Z worked to undo all the changes made by the formatter.

@eleanorjboyd eleanorjboyd removed their assignment May 30, 2023
@andreamah andreamah removed their assignment May 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants