Skip to content

Commit 1ba9ab4

Browse files
committed
clean up
1 parent 5113db6 commit 1ba9ab4

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

src/kernels/deepnote/deepnoteController.ts

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
1-
// Copyright (c) Microsoft Corporation.
2-
// Licensed under the MIT License.
3-
41
import {
52
CancellationToken,
63
NotebookCell,
74
NotebookCellExecution,
85
NotebookCellOutput,
9-
NotebookCellOutputItem,
10-
NotebookController
6+
NotebookCellOutputItem
117
} from 'vscode';
128

139
import { KernelController } from '../kernelController';
1410

15-
/**
16-
* DeepnoteController extends KernelController to intercept cell execution
17-
* and prepend initialization code to each cell execution.
18-
*/
19-
export class DeepnoteController extends KernelController {
20-
constructor(controller: NotebookController) {
21-
super(controller);
22-
}
23-
24-
public override createNotebookCellExecution(cell: NotebookCell): NotebookCellExecution {
25-
const execution = super.createNotebookCellExecution(cell);
26-
return new DeepnoteNotebookCellExecution(execution, cell);
27-
}
28-
}
29-
3011
/**
3112
* Wrapper around NotebookCellExecution that prepends initialization code.
3213
* This is implemented by delegating all calls to the underlying execution object.
@@ -89,3 +70,15 @@ class DeepnoteNotebookCellExecution implements NotebookCellExecution {
8970
return this.execution.appendOutputItems(items, output);
9071
}
9172
}
73+
74+
/**
75+
* DeepnoteController extends KernelController to intercept cell execution
76+
* and prepend initialization code to each cell execution.
77+
*/
78+
export class DeepnoteController extends KernelController {
79+
public override createNotebookCellExecution(cell: NotebookCell): NotebookCellExecution {
80+
const execution = super.createNotebookCellExecution(cell);
81+
82+
return new DeepnoteNotebookCellExecution(execution, cell);
83+
}
84+
}

0 commit comments

Comments
 (0)