Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Oct 16, 2024
1 parent af2c153 commit 0da6a2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/voila/src/plugins/outputs/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const renderOutputsPlugin: JupyterFrontEndPlugin<void> = {
const cells = new RenderedCells({ node });
app.shell.add(cells, 'main');
}
})
});
}
};

Expand Down
16 changes: 11 additions & 5 deletions packages/widgets_manager7/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ import { VoilaWidgetManager } from './manager';
const WIDGET_MIMETYPE = 'application/vnd.jupyter.widget-view+json';

class VoilaWidgetRenderer extends WidgetRenderer {

constructor(options: IRenderMime.IRendererOptions, manager: VoilaWidgetManager) {
constructor(
options: IRenderMime.IRendererOptions,
manager: VoilaWidgetManager
) {
super(options, manager);

this.voilaManager = manager;
Expand All @@ -49,8 +51,7 @@ class VoilaWidgetRenderer extends WidgetRenderer {
}

private voilaManager: VoilaWidgetManager;

};
}

/**
* The Voila widgets manager plugin.
Expand Down Expand Up @@ -88,20 +89,25 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
session: {
kernel,
kernelChanged: {
// eslint-disable-next-line @typescript-eslint/no-empty-function
connect: () => {}
}
},
statusChanged: {
// eslint-disable-next-line @typescript-eslint/no-empty-function
connect: () => {}
},
kernelChanged: {
// eslint-disable-next-line @typescript-eslint/no-empty-function
connect: () => {}
},
connectionStatusChanged: {
// eslint-disable-next-line @typescript-eslint/no-empty-function
connect: () => {}
}
},
saveState: {
// eslint-disable-next-line @typescript-eslint/no-empty-function
connect: () => {}
}
};
Expand Down Expand Up @@ -162,7 +168,7 @@ const widgetManager: JupyterFrontEndPlugin<IJupyterWidgetRegistry> = {
}
});

app.started.then(async() => {
app.started.then(async () => {
await manager._loadFromKernel();
});

Expand Down
6 changes: 1 addition & 5 deletions packages/widgets_manager7/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { INotebookModel } from '@jupyterlab/notebook';
import { Widget } from '@lumino/widgets';
import { MessageLoop } from '@lumino/messaging';


export class VoilaWidgetManager extends WidgetManager {
register_model(model_id: string, modelPromise: Promise<WidgetModel>): void {
super.register_model(model_id, modelPromise);
Expand Down Expand Up @@ -43,10 +42,7 @@ export class VoilaWidgetManager extends WidgetManager {
if (view.el) {
view.el.setAttribute('data-voila-jupyter-widget', '');
view.el.addEventListener('jupyterWidgetResize', (e: Event) => {
MessageLoop.postMessage(
view.pWidget,
Widget.ResizeMessage.UnknownSize
);
MessageLoop.postMessage(view.pWidget, Widget.ResizeMessage.UnknownSize);
});
}
return view.pWidget;
Expand Down

0 comments on commit 0da6a2b

Please sign in to comment.