diff --git a/package.json b/package.json index f5b0d6b56dca..a6087eb86952 100644 --- a/package.json +++ b/package.json @@ -1441,13 +1441,13 @@ "command": "python.execInTerminal-icon", "group": "navigation@0", "title": "%python.command.python.execInTerminalIcon.title%", - "when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported" + "when": "resourceLangId == python && resourceExtname != .pyi && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported" }, { "command": "python.execInDedicatedTerminal", "group": "navigation@0", "title": "%python.command.python.execInDedicatedTerminal.title%", - "when": "resourceLangId == python && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported" + "when": "resourceLangId == python && resourceExtname != .pyi && !isInDiffEditor && !virtualWorkspace && shellExecutionSupported" } ], "explorer/context": [