Skip to content

Commit

Permalink
fix: return dict in get data from task
Browse files Browse the repository at this point in the history
  • Loading branch information
antwxne committed Jun 15, 2022
1 parent 50c6209 commit a5830aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="CVAT wrapper",
version="0.0.17",
version="0.0.18",
author="antwxne",
author_email="[email protected]",
description="Python wrapper for CVAT API",
Expand Down
4 changes: 2 additions & 2 deletions src/CVAT/_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand All @@ -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())
return response.json()

0 comments on commit a5830aa

Please sign in to comment.