5
5
*/
6
6
7
7
import { Dialog , showDialog } from '@jupyterlab/apputils' ;
8
+ import { URLExt } from '@jupyterlab/coreutils' ;
8
9
import { CodeCell } from '@jupyterlab/cells' ;
9
10
import type { ICodeCellModel , MarkdownCell } from '@jupyterlab/cells' ;
10
- import { URLExt } from '@jupyterlab/coreutils' ;
11
11
import { INotebookCellExecutor } from '@jupyterlab/notebook' ;
12
12
import { ServerConnection } from '@jupyterlab/services' ;
13
13
import { nullTranslator } from '@jupyterlab/translation' ;
@@ -47,7 +47,6 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
47
47
} : INotebookCellExecutor . IRunCellOptions ) : Promise < boolean > {
48
48
translator = translator ?? nullTranslator ;
49
49
const trans = translator . load ( 'jupyterlab' ) ;
50
-
51
50
switch ( cell . model . type ) {
52
51
case 'markdown' :
53
52
( cell as MarkdownCell ) . rendered = true ;
@@ -83,14 +82,12 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
83
82
await sessionDialogs . selectKernel ( sessionContext ) ;
84
83
}
85
84
}
86
-
87
85
if ( sessionContext . hasNoKernel ) {
88
86
cell . model . sharedModel . transact ( ( ) => {
89
87
( cell . model as ICodeCellModel ) . clearExecution ( ) ;
90
88
} ) ;
91
89
return true ;
92
90
}
93
-
94
91
const kernelId = sessionContext ?. session ?. kernel ?. id ;
95
92
const executeApiURL = URLExt . join (
96
93
this . _serverSettings . baseUrl ,
@@ -100,7 +97,6 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
100
97
const cellId = cell . model . sharedModel . getId ( ) ;
101
98
const documentId = notebook . sharedModel . getState ( 'document_id' ) ;
102
99
const { recordTiming } = notebookConfig ;
103
-
104
100
const init = {
105
101
method : 'POST' ,
106
102
body : JSON . stringify ( {
@@ -115,7 +111,7 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
115
111
onCellExecutionScheduled ( { cell } ) ;
116
112
let success = false ;
117
113
try {
118
- // FIXME quid of deletedCells and timing record
114
+ // FIXME quid of deletedCells and timing record.
119
115
const response = await requestServer (
120
116
cell as CodeCell ,
121
117
executeApiURL ,
@@ -136,9 +132,7 @@ export class NotebookCellServerExecutor implements INotebookCellExecutor {
136
132
throw error ;
137
133
}
138
134
}
139
-
140
135
onCellExecuted ( { cell, success } ) ;
141
-
142
136
return true ;
143
137
}
144
138
cell . model . sharedModel . transact ( ( ) => {
0 commit comments