From a5830aae276fb50fe514701a02fee342272582a4 Mon Sep 17 00:00:00 2001 From: Antoine DESRUET Date: Wed, 15 Jun 2022 11:26:45 +0200 Subject: [PATCH] fix: return dict in get data from task --- setup.py | 2 +- src/CVAT/_get.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 45a32ab..41c535a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="CVAT wrapper", - version="0.0.17", + version="0.0.18", author="antwxne", author_email="antoine.desruet@epitech.eu", description="Python wrapper for CVAT API", diff --git a/src/CVAT/_get.py b/src/CVAT/_get.py index 1909848..41b00b5 100644 --- a/src/CVAT/_get.py +++ b/src/CVAT/_get.py @@ -193,7 +193,7 @@ def get_task_annotation(self, task: Union[Task, int]) -> dict: response: Response = self.session.get(url=f'{self.url}/api/tasks/{task}/annotations') if response.status_code != 200: raise Exception(response.content) - return Task.from_json(response.json()) + return response.json() def get_task_data(self, task: Union[Task, int]) -> dict: """ @@ -209,4 +209,4 @@ def get_task_data(self, task: Union[Task, int]) -> dict: response: Response = self.session.get(url=f'{self.url}/api/tasks/{task}/data/meta') if response.status_code != 200: raise Exception(response.content) - return Task.from_json(response.json()) \ No newline at end of file + return response.json() \ No newline at end of file