55from .projects import Project
66
77TASK_TYPES = [
8- 'annotation' ,
8+ 'annotation' ,
99 'audiotranscription' ,
1010 'categorization' ,
1111 'comparison' ,
1818 'polygonannotation' ,
1919 'segmentannotation' ,
2020 'transcription' ,
21+ 'textcollection' ,
2122 'documenttranscription' ,
2223 'videoannotation' ,
2324 'videoboxannotation' ,
@@ -161,7 +162,7 @@ def create_batch(self, project, batch_name, callback):
161162 payload = dict (project = project , name = batch_name , callback = callback )
162163 batchdata = self ._postrequest ('batches' , payload )
163164 return Batch (batchdata , self )
164-
165+
165166 def finalize_batch (self , batch_name ):
166167 batchdata = self ._postrequest ('batches/%s/finalize' % batch_name )
167168 return Batch (batchdata , self )
@@ -184,7 +185,8 @@ def list_batches(self, **kwargs):
184185 response = self ._getrequest ('batches' , params = kwargs )
185186 docs = [Batch (doc , self ) for doc in response ['docs' ]]
186187 return Batchlist (
187- docs , response ['totalDocs' ], response ['limit' ],response ['has_more' ], response .get ('next_token' ),
188+ docs , response ['totalDocs' ], response ['limit' ], response ['has_more' ], response .get (
189+ 'next_token' ),
188190 )
189191
190192 def create_project (self , project_name , type , params ):
@@ -195,12 +197,12 @@ def create_project(self, project_name, type, params):
195197 def get_projet (self , project_name ):
196198 projectdata = self ._getrequest ('projects/%s' % project_name )
197199 return Project (projectdata , self )
198-
200+
199201 def projects (self ):
200202 response = self ._getrequest ('projects' )
201203 return response
202204
203- def update_project (self ,project_name ,** kwargs ):
205+ def update_project (self , project_name , ** kwargs ):
204206 allowed_kwargs = {'patch' , 'instruction' }
205207 for key in kwargs :
206208 if key not in allowed_kwargs :
@@ -210,9 +212,6 @@ def update_project(self,project_name,**kwargs):
210212 return projectdata
211213
212214
213-
214-
215-
216215def _AddTaskTypeCreator (task_type ):
217216 def create_task_wrapper (self , ** kwargs ):
218217 return self .create_task (task_type , ** kwargs )
0 commit comments