Skip to content

Commit 9034e22

Browse files
committed
update return docstring
1 parent 3164af8 commit 9034e22

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

meilisearch/index.py

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ def get_tasks(self, parameters: Optional[Dict[str, Any]] = None) -> TaskResults:
139139
140140
Returns
141141
-------
142-
task:
143-
Dictionary with limit, from, next and results containing a list of all enqueued, processing, succeeded or failed tasks of the index.
142+
TaskResults instance with attributes:
143+
- from_
144+
- next_
145+
- limit
146+
- results : list of Task instances containing all enqueued, processing, succeeded or failed tasks of the index
144147
145148
Raises
146149
------
@@ -165,8 +168,8 @@ def get_task(self, uid: int) -> Task:
165168
166169
Returns
167170
-------
168-
task:
169-
Dictionary containing information about the processed asynchronous task of an index.
171+
Task:
172+
Task instance containing information about the processed asynchronous task of an index.
170173
171174
Raises
172175
------
@@ -194,8 +197,8 @@ def wait_for_task(
194197
195198
Returns
196199
-------
197-
task:
198-
Dictionary containing information about the processed asynchronous task.
200+
Task:
201+
Task instance containing information about the processed asynchronous task.
199202
200203
Raises
201204
------
@@ -213,8 +216,8 @@ def get_stats(self) -> IndexStats:
213216
214217
Returns
215218
-------
216-
stats:
217-
Dictionary containing stats about the given index.
219+
IndexStats:
220+
IndexStats instance containing information about the given index.
218221
219222
Raises
220223
------
@@ -270,8 +273,8 @@ def get_document(self, document_id: str, parameters: Optional[Dict[str, Any]] =
270273
271274
Returns
272275
-------
273-
document:
274-
Dictionary containing the documents information.
276+
Document:
277+
Document instance containing the documents information.
275278
276279
Raises
277280
------
@@ -298,8 +301,11 @@ def get_documents(self, parameters: Optional[Dict[str, Any]] = None) -> Document
298301
299302
Returns
300303
-------
301-
document:
302-
Dictionary with limit, offset, total and results a list of dictionaries containing the documents information.
304+
DocumentsResults instance with attributes:
305+
- total
306+
- offset
307+
- limit
308+
- results : list of Document instances containing the documents information
303309
304310
Raises
305311
------
@@ -332,8 +338,8 @@ def add_documents(
332338
333339
Returns
334340
-------
335-
task:
336-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
341+
TaskInfo:
342+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
337343
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
338344
339345
Raises
@@ -364,8 +370,8 @@ def add_documents_in_batches(
364370
365371
Returns
366372
-------
367-
task:
368-
List of dictionaries containing a task to track the informations about the progress of an asynchronous process.
373+
TaskInfo (list):
374+
List of TaskInfo instances containing information about a task to track the progress of an asynchronous process.
369375
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
370376
371377
Raises
@@ -399,8 +405,8 @@ def add_documents_json(
399405
400406
Returns
401407
-------
402-
task:
403-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
408+
TaskInfo:
409+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
404410
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
405411
406412
Raises
@@ -426,8 +432,8 @@ def add_documents_csv(
426432
427433
Returns
428434
-------
429-
task:
430-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
435+
TaskInfo:
436+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
431437
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
432438
433439
Raises
@@ -453,8 +459,8 @@ def add_documents_ndjson(
453459
454460
Returns
455461
-------
456-
task:
457-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
462+
TaskInfo:
463+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
458464
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
459465
460466
Raises
@@ -483,8 +489,8 @@ def add_documents_raw(
483489
484490
Returns
485491
-------
486-
task:
487-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
492+
TaskInfo:
493+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
488494
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
489495
490496
Raises
@@ -512,8 +518,8 @@ def update_documents(
512518
513519
Returns
514520
-------
515-
task:
516-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
521+
TaskInfo:
522+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
517523
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
518524
519525
Raises
@@ -544,8 +550,8 @@ def update_documents_in_batches(
544550
545551
Returns
546552
-------
547-
task:
548-
List of dictionaries containing a task to track the informations about the progress of an asynchronous process.
553+
TaskInfo (list):
554+
List of TaskInfo instances containing information about a task to track the progress of an asynchronous process.
549555
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
550556
551557
Raises
@@ -573,8 +579,8 @@ def delete_document(self, document_id: str) -> TaskInfo:
573579
574580
Returns
575581
-------
576-
task:
577-
Dictionary containing a task to track the informations about the progress of an asynchronous process.
582+
TaskInfo:
583+
TaskInfo instance containing information about a task to track the progress of an asynchronous process.
578584
https://docs.meilisearch.com/reference/api/tasks.html#get-one-task
579585
580586
Raises

0 commit comments

Comments
 (0)