Skip to content

Commit c86868b

Browse files
committed
Fixes
1 parent 2cc1928 commit c86868b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/client/datascience/notebook/notebookEditorProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ export class NotebookEditorProvider implements INotebookEditorProvider {
180180
const deferred = this.notebooksWaitingToBeOpenedByUri.get(uri.toString())!;
181181
deferred.resolve(editor);
182182
this.notebookEditorsByUri.set(uri.toString(), editor);
183+
if (!model.isTrusted) {
184+
await this.commandManager.executeCommand(Commands.TrustNotebook, model.file);
185+
}
183186
}
184187
private onDidChangeActiveVsCodeNotebookEditor(editor: VSCodeNotebookEditor | undefined) {
185188
if (!editor) {

src/test/datascience/.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
"files.autoSave": "off",
2525
// We don't want jupyter to start when testing (DS functionality or anything else).
2626
"python.dataScience.disableJupyterAutoStart": true,
27-
"python.logging.level": "debug"
27+
"python.logging.level": "debug",
28+
"python.dataScience.alwaysTrustNotebooks": true // In UI tests we don't want prompts for `Do you want to trust thie nb...`
2829
}

0 commit comments

Comments
 (0)