Skip to content

Commit ad3312a

Browse files
committed
fix styling issues
1 parent c6e5115 commit ad3312a

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

src/index.ts

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { ICodeCellModel } from '@jupyterlab/cells';
99

1010
import { checkBrowserNotificationSettings } from './settings';
1111

12-
1312
/**
1413
* Constructs notification message and displays it.
1514
*/
@@ -26,7 +25,9 @@ function displayNotification(
2625
icon: '/static/favicon.ico',
2726
body: ''
2827
};
29-
const title = failedExecution ? `${notebookName} Failed!` : `${notebookName} Completed!`;
28+
const title = failedExecution
29+
? `${notebookName} Failed!`
30+
: `${notebookName} Completed!`;
3031
let message = '';
3132

3233
if (failedExecution) {
@@ -70,17 +71,14 @@ function triggerNotification(
7071
cellNumberType === 'cell_index'
7172
? notebook.activeCellIndex
7273
: codeCellModel.executionCount;
73-
const notebookName = notebook.title.label.replace(
74-
/\.[^/.]+$/,
75-
''
76-
);
74+
const notebookName = notebook.title.label.replace(/\.[^/.]+$/, '');
7775
displayNotification(
7876
cellDuration,
7977
cellNumber,
8078
notebookName,
8179
reportCellNumber,
8280
reportCellExecutionTime,
83-
failedExecution,
81+
failedExecution,
8482
error
8583
);
8684
}
@@ -109,8 +107,7 @@ const extension: JupyterFrontEndPlugin<void> = {
109107
.composite as boolean;
110108
reportCellNumber = setting.get('report_cell_number')
111109
.composite as boolean;
112-
cellNumberType = setting.get('cell_number_type')
113-
.composite as string;
110+
cellNumberType = setting.get('cell_number_type').composite as string;
114111
};
115112
updateSettings();
116113
setting.changed.connect(updateSettings);
@@ -128,16 +125,18 @@ const extension: JupyterFrontEndPlugin<void> = {
128125
if (enabled) {
129126
const { cell, notebook, success, error } = args;
130127
const cellEndTime = new Date();
131-
triggerNotification(cell,
132-
notebook,
133-
cellStartTime,
134-
cellEndTime,
135-
minimumCellExecutionTime,
136-
reportCellNumber,
137-
reportCellExecutionTime,
138-
cellNumberType,
139-
!success,
140-
error);
128+
triggerNotification(
129+
cell,
130+
notebook,
131+
cellStartTime,
132+
cellEndTime,
133+
minimumCellExecutionTime,
134+
reportCellNumber,
135+
reportCellExecutionTime,
136+
cellNumberType,
137+
!success,
138+
error
139+
);
141140
}
142141
});
143142
}

0 commit comments

Comments
 (0)