@@ -125,9 +125,9 @@ def remove_notebook_cells(self, doc_uri, start, delete_count):
125
125
126
126
def update_notebook_metadata (self , doc_uri , metadata ):
127
127
self ._docs [doc_uri ].metadata = metadata
128
-
129
- def put_cell_document (self , doc_uri , language_id , parent , source , version = None ):
130
- self ._docs [doc_uri ] = self ._create_cell_document (doc_uri , language_id , parent , source , version )
128
+
129
+ def put_cell_document (self , doc_uri , language_id , source , version = None ):
130
+ self ._docs [doc_uri ] = self ._create_cell_document (doc_uri , language_id , source , version )
131
131
132
132
def rm_document (self , doc_uri ):
133
133
self ._docs .pop (doc_uri )
@@ -275,7 +275,7 @@ def _create_document(self, doc_uri, source=None, version=None):
275
275
extra_sys_path = self .source_roots (path ),
276
276
rope_project_builder = self ._rope_project_builder ,
277
277
)
278
-
278
+
279
279
def _create_notebook_document (self , doc_uri , notebook_type , cells , version = None , metadata = None ):
280
280
return Notebook (
281
281
doc_uri ,
@@ -286,14 +286,13 @@ def _create_notebook_document(self, doc_uri, notebook_type, cells, version=None,
286
286
metadata = metadata
287
287
)
288
288
289
- def _create_cell_document (self , doc_uri , language_id , parent , source = None , version = None ):
289
+ def _create_cell_document (self , doc_uri , language_id , source = None , version = None ):
290
290
# TODO: remove what is unnecessary here.
291
291
path = uris .to_fs_path (doc_uri )
292
292
return Cell (
293
293
doc_uri ,
294
294
language_id = language_id ,
295
295
workspace = self ,
296
- parent = parent ,
297
296
source = source ,
298
297
version = version ,
299
298
extra_sys_path = self .source_roots (path ),
@@ -497,7 +496,7 @@ def __init__(self, uri, notebook_type, workspace, cells=None, version=None, meta
497
496
498
497
def __str__ (self ):
499
498
return "Notebook with URI '%s'" % str (self .uri )
500
-
499
+
501
500
def add_cells (self , new_cells : List , start : int ) -> None :
502
501
self .cells [start :start ] = new_cells
503
502
@@ -509,8 +508,7 @@ def remove_cells(self, start: int, delete_count: int) -> None:
509
508
class Cell (Document ):
510
509
"""Represents a cell in a notebook."""
511
510
512
- def __init__ (self , uri , language_id , workspace , parent , source = None , version = None , local = True , extra_sys_path = None ,
511
+ def __init__ (self , uri , language_id , workspace , source = None , version = None , local = True , extra_sys_path = None ,
513
512
rope_project_builder = None ):
514
513
super ().__init__ (uri , workspace , source , version , local , extra_sys_path , rope_project_builder )
515
514
self .language_id = language_id
516
- self .parent = parent
0 commit comments