Skip to content

Commit f037f77

Browse files
baptiste-olivierNicolas Hervé
authored andcommitted
refactor: fix pyright warnings
1 parent a6dbb04 commit f037f77

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

tests/unit/services/export/helpers/coco.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from typing import Dict, List, Optional, Union
44

5-
from kili_formats.types import Job
5+
from kili_formats.types import Job, JobTool
66

77

88
def get_asset(
@@ -127,7 +127,7 @@ def angle_to_horizontal(point1: Dict, point2: Dict):
127127
},
128128
instruction="dessert",
129129
isChild=False,
130-
tools=["rectangle"],
130+
tools=[JobTool.RECTANGLE],
131131
mlTask="OBJECT_DETECTION",
132132
models=None,
133133
isVisible=True,
@@ -141,7 +141,7 @@ def angle_to_horizontal(point1: Dict, point2: Dict):
141141
},
142142
instruction="main course",
143143
isChild=False,
144-
tools=["rectangle"],
144+
tools=[JobTool.RECTANGLE],
145145
mlTask="OBJECT_DETECTION",
146146
models=None,
147147
isVisible=True,

tests/unit/services/export/test_coco.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from pathlib import Path
44

55
from kili_formats import convert_from_kili_to_coco_format
6+
from kili_formats.types import JobTool
67
from PIL import Image
78

8-
from kili.services.types import JobName
99
from kili.utils.tempfile import TemporaryDirectory
1010

1111
from .helpers import coco as helpers
@@ -21,7 +21,7 @@ def test__get_coco_image_annotations():
2121
Image.new("RGB", (image_width, image_height)).save(local_file_path)
2222
_, paths = convert_from_kili_to_coco_format(
2323
jobs={
24-
JobName(job_name): {
24+
job_name: {
2525
"mlTask": "OBJECT_DETECTION",
2626
"content": {
2727
"categories": {
@@ -35,7 +35,7 @@ def test__get_coco_image_annotations():
3535
"isVisible": True,
3636
"models": {},
3737
"required": True,
38-
"tools": ["semantic"],
38+
"tools": [JobTool.SEMANTIC],
3939
}
4040
},
4141
assets=[

tests/unit/services/export/test_kili.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,8 @@ def test_save_assets_export_with_external_id_containing_slash(
513513
exporter.project = {
514514
"id": "fake_proj_id",
515515
"title": "fake_proj_title",
516+
"description": "fake_proj_description",
517+
"organizationId": "fake_organization_id",
516518
"inputType": "IMAGE",
517519
"jsonInterface": {
518520
"jobs": {

0 commit comments

Comments
 (0)