@@ -22,23 +22,23 @@ class Checkpoints(LoggingConfigurable):
22
22
23
23
def create_checkpoint (self , contents_mgr , path ):
24
24
"""Create a checkpoint."""
25
- raise NotImplementedError ( "must be implemented in a subclass" )
25
+ raise NotImplementedError
26
26
27
27
def restore_checkpoint (self , contents_mgr , checkpoint_id , path ):
28
28
"""Restore a checkpoint"""
29
- raise NotImplementedError ( "must be implemented in a subclass" )
29
+ raise NotImplementedError
30
30
31
31
def rename_checkpoint (self , checkpoint_id , old_path , new_path ):
32
32
"""Rename a single checkpoint from old_path to new_path."""
33
- raise NotImplementedError ( "must be implemented in a subclass" )
33
+ raise NotImplementedError
34
34
35
35
def delete_checkpoint (self , checkpoint_id , path ):
36
36
"""delete a checkpoint for a file"""
37
- raise NotImplementedError ( "must be implemented in a subclass" )
37
+ raise NotImplementedError
38
38
39
39
def list_checkpoints (self , path ):
40
40
"""Return a list of checkpoints for a given file"""
41
- raise NotImplementedError ( "must be implemented in a subclass" )
41
+ raise NotImplementedError
42
42
43
43
def rename_all_checkpoints (self , old_path , new_path ):
44
44
"""Rename all checkpoints for old_path to new_path."""
@@ -107,14 +107,14 @@ def create_file_checkpoint(self, content, format, path):
107
107
108
108
Returns a checkpoint model for the new checkpoint.
109
109
"""
110
- raise NotImplementedError ( "must be implemented in a subclass" )
110
+ raise NotImplementedError
111
111
112
112
def create_notebook_checkpoint (self , nb , path ):
113
113
"""Create a checkpoint of the current state of a file
114
114
115
115
Returns a checkpoint model for the new checkpoint.
116
116
"""
117
- raise NotImplementedError ( "must be implemented in a subclass" )
117
+ raise NotImplementedError
118
118
119
119
def get_file_checkpoint (self , checkpoint_id , path ):
120
120
"""Get the content of a checkpoint for a non-notebook file.
@@ -126,7 +126,7 @@ def get_file_checkpoint(self, checkpoint_id, path):
126
126
'format': {'text','base64'},
127
127
}
128
128
"""
129
- raise NotImplementedError ( "must be implemented in a subclass" )
129
+ raise NotImplementedError
130
130
131
131
def get_notebook_checkpoint (self , checkpoint_id , path ):
132
132
"""Get the content of a checkpoint for a notebook.
@@ -137,7 +137,7 @@ def get_notebook_checkpoint(self, checkpoint_id, path):
137
137
'content': <output of nbformat.read>,
138
138
}
139
139
"""
140
- raise NotImplementedError ( "must be implemented in a subclass" )
140
+ raise NotImplementedError
141
141
142
142
143
143
class AsyncCheckpoints (Checkpoints ):
@@ -147,23 +147,23 @@ class AsyncCheckpoints(Checkpoints):
147
147
148
148
async def create_checkpoint (self , contents_mgr , path ):
149
149
"""Create a checkpoint."""
150
- raise NotImplementedError ( "must be implemented in a subclass" )
150
+ raise NotImplementedError
151
151
152
152
async def restore_checkpoint (self , contents_mgr , checkpoint_id , path ):
153
153
"""Restore a checkpoint"""
154
- raise NotImplementedError ( "must be implemented in a subclass" )
154
+ raise NotImplementedError
155
155
156
156
async def rename_checkpoint (self , checkpoint_id , old_path , new_path ):
157
157
"""Rename a single checkpoint from old_path to new_path."""
158
- raise NotImplementedError ( "must be implemented in a subclass" )
158
+ raise NotImplementedError
159
159
160
160
async def delete_checkpoint (self , checkpoint_id , path ):
161
161
"""delete a checkpoint for a file"""
162
- raise NotImplementedError ( "must be implemented in a subclass" )
162
+ raise NotImplementedError
163
163
164
164
async def list_checkpoints (self , path ):
165
165
"""Return a list of checkpoints for a given file"""
166
- raise NotImplementedError ( "must be implemented in a subclass" )
166
+ raise NotImplementedError
167
167
168
168
async def rename_all_checkpoints (self , old_path , new_path ):
169
169
"""Rename all checkpoints for old_path to new_path."""
@@ -217,14 +217,14 @@ async def create_file_checkpoint(self, content, format, path):
217
217
218
218
Returns a checkpoint model for the new checkpoint.
219
219
"""
220
- raise NotImplementedError ( "must be implemented in a subclass" )
220
+ raise NotImplementedError
221
221
222
222
async def create_notebook_checkpoint (self , nb , path ):
223
223
"""Create a checkpoint of the current state of a file
224
224
225
225
Returns a checkpoint model for the new checkpoint.
226
226
"""
227
- raise NotImplementedError ( "must be implemented in a subclass" )
227
+ raise NotImplementedError
228
228
229
229
async def get_file_checkpoint (self , checkpoint_id , path ):
230
230
"""Get the content of a checkpoint for a non-notebook file.
@@ -236,7 +236,7 @@ async def get_file_checkpoint(self, checkpoint_id, path):
236
236
'format': {'text','base64'},
237
237
}
238
238
"""
239
- raise NotImplementedError ( "must be implemented in a subclass" )
239
+ raise NotImplementedError
240
240
241
241
async def get_notebook_checkpoint (self , checkpoint_id , path ):
242
242
"""Get the content of a checkpoint for a notebook.
@@ -247,4 +247,4 @@ async def get_notebook_checkpoint(self, checkpoint_id, path):
247
247
'content': <output of nbformat.read>,
248
248
}
249
249
"""
250
- raise NotImplementedError ( "must be implemented in a subclass" )
250
+ raise NotImplementedError
0 commit comments