Skip to content

Commit 96d1645

Browse files
Ian HuffIan Huff
authored andcommitted
prettier fixup
1 parent 13a9f34 commit 96d1645

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/client/datascience/kernel-launcher/kernelLauncher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class KernelProcess implements IKernelProcess {
7979
const exeObs = executionService.execObservable(args, {});
8080

8181
if (exeObs.proc) {
82-
exeObs.proc!.on('exit', exitCode => {
82+
exeObs.proc!.on('exit', (exitCode) => {
8383
traceInfo('KernelProcess Exit', `Exit - ${exitCode}`);
8484
if (!this.readyPromise.completed) {
8585
this.readyPromise.reject(new Error(localize.DataScience.rawKernelProcessExitBeforeConnect()));
@@ -90,7 +90,7 @@ class KernelProcess implements IKernelProcess {
9090
traceInfo('KernelProcess failed to launch');
9191
this.readyPromise.reject(new Error(localize.DataScience.rawKernelProcessNotStarted()));
9292
}
93-
exeObs.out.subscribe(output => {
93+
exeObs.out.subscribe((output) => {
9494
if (output.source === 'stderr') {
9595
traceWarning(`StdErr from Kernel Process ${output.out}`);
9696
} else {

src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class HostRawNotebookProvider
124124
}
125125
} catch (ex) {
126126
// Make sure we shut down our session in case we started a process
127-
rawSession.dispose().catch(error => {
127+
rawSession.dispose().catch((error) => {
128128
traceError(`Failed to dispose of raw session on launch error: ${error} `);
129129
});
130130
// If there's an error, then reject the promise that is returned.

src/client/datascience/raw-kernel/rawJupyterSession.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ export class RawJupyterSession extends BaseJupyterSession {
122122
}
123123

124124
// Watch to see if our process exits
125-
this.processExitHandler = process.exited(exitCode => {
125+
this.processExitHandler = process.exited((exitCode) => {
126126
traceError(`Raw kernel process exited code: ${exitCode}`);
127-
this.shutdown().catch(reason => {
127+
this.shutdown().catch((reason) => {
128128
traceError(`Error shutting down raw jupyter session: ${reason}`);
129129
});
130130
// Next code the user executes will show a session disposed message

src/client/datascience/raw-kernel/rawNotebookProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class RawNotebookProviderBase implements IRawNotebookProvider {
6161
public async dispose(): Promise<void> {
6262
traceInfo(`Shutting down notebooks for ${this.id}`);
6363
const notebooks = await Promise.all([...this.notebooks.values()]);
64-
await Promise.all(notebooks.map(n => n?.dispose()));
64+
await Promise.all(notebooks.map((n) => n?.dispose()));
6565
}
6666

6767
// This may be a bit of a noop in the raw case
@@ -81,7 +81,7 @@ export class RawNotebookProviderBase implements IRawNotebookProvider {
8181
};
8282

8383
notebook
84-
.then(nb => {
84+
.then((nb) => {
8585
const oldDispose = nb.dispose;
8686
nb.dispose = () => {
8787
this.notebooks.delete(identity.toString());

src/test/datascience/raw-kernel/rawJupyterSession.unit.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ suite('Data Science - RawJupyterSession', () => {
3737

3838
// Fake out our jmp connection
3939
jmpConnection = createTypeMoq<IJMPConnection>('jmp connection');
40-
jmpConnection.setup(jmp => jmp.connect(typemoq.It.isAny())).returns(() => Promise.resolve());
40+
jmpConnection.setup((jmp) => jmp.connect(typemoq.It.isAny())).returns(() => Promise.resolve());
4141
when(serviceContainer.get<IJMPConnection>(IJMPConnection)).thenReturn(jmpConnection.object);
4242

4343
// Set up a fake kernel process for the launcher to return
4444
processExitEvent = new EventEmitter<number | null>();
4545
kernelProcess = createTypeMoq<IKernelProcess>('kernel process');
46-
kernelProcess.setup(kp => kp.kernelSpec).returns(() => 'testspec' as any);
47-
kernelProcess.setup(kp => kp.connection).returns(() => 'testconnection' as any);
48-
kernelProcess.setup(kp => kp.ready).returns(() => Promise.resolve());
49-
kernelProcess.setup(kp => kp.exited).returns(() => processExitEvent.event);
46+
kernelProcess.setup((kp) => kp.kernelSpec).returns(() => 'testspec' as any);
47+
kernelProcess.setup((kp) => kp.connection).returns(() => 'testconnection' as any);
48+
kernelProcess.setup((kp) => kp.ready).returns(() => Promise.resolve());
49+
kernelProcess.setup((kp) => kp.exited).returns(() => processExitEvent.event);
5050
when(kernelLauncher.launch(anything(), anything())).thenResolve(kernelProcess.object);
5151

5252
rawJupyterSession = new RawJupyterSession(instance(kernelLauncher), instance(serviceContainer));

0 commit comments

Comments
 (0)