@@ -225,25 +225,25 @@ return for a more complete implementation.
225
225
226
226
.. code-block :: python
227
227
228
- class NoOpCheckpoints(GenericCheckpointsMixin, Checkpoints):
229
- """requires the following methods:"""
230
- def create_file_checkpoint(self, content, format, path):
231
- """ -> checkpoint model"""
232
- def create_notebook_checkpoint(self, nb, path):
233
- """ -> checkpoint model"""
234
- def get_file_checkpoint(self, checkpoint_id, path):
235
- """ -> {'type': 'file', 'content': <str>, 'format': {'text', 'base64'}}"""
236
- def get_notebook_checkpoint(self, checkpoint_id, path):
237
- """ -> {'type': 'notebook', 'content': <output of nbformat.read>}"""
238
- def delete_checkpoint(self, checkpoint_id, path):
239
- """deletes a checkpoint for a file"""
240
- def list_checkpoints(self, path):
241
- """returns a list of checkpoint models for a given file,
242
- default just does one per file
243
- """
244
- return []
245
- def rename_checkpoint(self, checkpoint_id, old_path, new_path):
246
- """renames checkpoint from old path to new path"""
228
+ class NoOpCheckpoints (GenericCheckpointsMixin , Checkpoints ):
229
+ """ requires the following methods:"""
230
+ def create_file_checkpoint (self , content , format , path ):
231
+ """ -> checkpoint model"""
232
+ def create_notebook_checkpoint (self , nb , path ):
233
+ """ -> checkpoint model"""
234
+ def get_file_checkpoint (self , checkpoint_id , path ):
235
+ """ -> {'type': 'file', 'content': <str>, 'format': {'text', 'base64'}}"""
236
+ def get_notebook_checkpoint (self , checkpoint_id , path ):
237
+ """ -> {'type': 'notebook', 'content': <output of nbformat.read>}"""
238
+ def delete_checkpoint (self , checkpoint_id , path ):
239
+ """ deletes a checkpoint for a file"""
240
+ def list_checkpoints (self , path ):
241
+ """ returns a list of checkpoint models for a given file,
242
+ default just does one per file
243
+ """
244
+ return []
245
+ def rename_checkpoint (self , checkpoint_id , old_path , new_path ):
246
+ """ renames checkpoint from old path to new path"""
247
247
248
248
See ``GenericFileCheckpoints `` in :mod: `notebook.services.contents.filecheckpoints `
249
249
for a more complete example.
0 commit comments