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

Hide Run Python option when in Jupyter Notebook #23732

Merged
merged 2 commits into from
Jul 9, 2024

Conversation

anthonykim1
Copy link

@anthonykim1 anthonykim1 commented Jul 2, 2024

Resolves: #22739

@anthonykim1 anthonykim1 self-assigned this Jul 2, 2024
@anthonykim1 anthonykim1 added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. area-repl skip package*.json package.json and package-lock.json don't both need updating labels Jul 2, 2024
@anthonykim1 anthonykim1 marked this pull request as ready for review July 2, 2024 22:51
@vscodenpa vscodenpa added this to the July 2024 milestone Jul 2, 2024
karthiknadig
karthiknadig previously approved these changes Jul 3, 2024
package.json Outdated
@@ -1361,7 +1361,7 @@
{
"submenu": "python.run",
"group": "Python",
"when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted"
"when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted && !jupyter.ownsSelection && !notebookEditorFocused "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an additional whitespace at the end. Also I wonder if !notebookEditorFocused is sufficient as we just want to filter out all notebooks.

If we only want to filter out Jupyter notebook, but not necessarily other custom notebook (including repl), then the check is notebookType != jupyter-notebook

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for input! Just made changes to 4ac4ab3 adding notebookType != jupyter-notebook to only exclude notebook and include REPL

@anthonykim1 anthonykim1 merged commit 7e434a7 into microsoft:main Jul 9, 2024
40 checks passed
eleanorjboyd pushed a commit to eleanorjboyd/vscode-python that referenced this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-repl debt Covers everything internal: CI, testing, refactoring of the codebase, etc. skip package*.json package.json and package-lock.json don't both need updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run Python command is available in Jupyter Notebook Cell
5 participants