From 00bcb1a39acf8664736c9375ee2ae0093a32fd29 Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Tue, 2 Jul 2024 15:44:14 -0700 Subject: [PATCH 1/2] hide run Python for jupyter --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3de58d434ec4..9b4e52656b2e 100644 --- a/package.json +++ b/package.json @@ -1361,7 +1361,7 @@ { "submenu": "python.run", "group": "Python", - "when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted" + "when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted && !jupyter.ownsSelection && !notebookEditorFocused " }, { "submenu": "python.runFileInteractive", From 4ac4ab313b505ab1293fd7ff298764a92ce19e8e Mon Sep 17 00:00:00 2001 From: Anthony Kim Date: Mon, 8 Jul 2024 14:49:11 -0700 Subject: [PATCH 2/2] only exclude Run Python from Jupyter notebook --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b4e52656b2e..705569ecab5e 100644 --- a/package.json +++ b/package.json @@ -1361,7 +1361,7 @@ { "submenu": "python.run", "group": "Python", - "when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted && !jupyter.ownsSelection && !notebookEditorFocused " + "when": "editorLangId == python && !virtualWorkspace && shellExecutionSupported && isWorkspaceTrusted && notebookType != jupyter-notebook" }, { "submenu": "python.runFileInteractive",