@@ -21,15 +21,14 @@ import { NotebookConcatTextDocument, NotebookCell, NotebookDocument } from 'vsco
2121import { IVSCodeNotebook } from '../../common/application/types' ;
2222import { IDisposable } from '../../common/types' ;
2323import { PYTHON_LANGUAGE } from '../../common/constants' ;
24- import { SafeNotebookDocument } from './safeNotebookDocument' ;
2524
2625const NotebookConcatPrefix = '_NotebookConcat_' ;
2726
2827/**
2928 * This helper class is used to present a converted document to an LS
3029 */
3130export class NotebookConcatDocument implements TextDocument , IDisposable {
32- public get notebook ( ) : SafeNotebookDocument {
31+ public get notebook ( ) : NotebookDocument {
3332 return this . _notebook ;
3433 }
3534
@@ -118,14 +117,14 @@ export class NotebookConcatDocument implements TextDocument, IDisposable {
118117
119118 private onCellsChangedEmitter = new EventEmitter < TextDocumentChangeEvent > ( ) ;
120119
121- private _notebook : SafeNotebookDocument ;
120+ private _notebook : NotebookDocument ;
122121
123122 constructor ( notebook : NotebookDocument , notebookApi : IVSCodeNotebook , selector : DocumentSelector ) {
124123 const dir = path . dirname ( notebook . uri . fsPath ) ;
125124 // Create a safe notebook document so that we can handle both >= 1.56 vscode API and < 1.56
126125 // when vscode stable is 1.56 and both Python release and insiders can update to that engine version we
127126 // can remove this and just use NotebookDocument directly
128- this . _notebook = new SafeNotebookDocument ( notebook ) ;
127+ this . _notebook = notebook ;
129128 // Note: Has to be different than the prefix for old notebook editor (HiddenFileFormat) so
130129 // that the caller doesn't remove diagnostics for this document.
131130 this . dummyFilePath = path . join ( dir , `${ NotebookConcatPrefix } ${ uuid ( ) . replace ( / - / g, '' ) } .py` ) ;
0 commit comments