Skip to content

Commit 42c3795

Browse files
committed
make validate
1 parent dc77756 commit 42c3795

File tree

4 files changed

+488
-444
lines changed

4 files changed

+488
-444
lines changed

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def copy_image(
571571
to_project_name=destination_project,
572572
to_folder_name=destination_folder,
573573
image_name=image_name,
574-
copy_annotation_status=copy_annotation_status
574+
copy_annotation_status=copy_annotation_status,
575575
)
576576
if response.errors:
577577
raise AppException(response.errors)
@@ -1992,15 +1992,17 @@ def move_image(
19921992
:type copy_pin: bool
19931993
"""
19941994
source_project_name, source_folder_name = extract_project_folder(source_project)
1995-
destination_project_name, destination_folder = extract_project_folder(destination_project)
1995+
destination_project_name, destination_folder = extract_project_folder(
1996+
destination_project
1997+
)
19961998
response = controller.copy_image(
19971999
from_project_name=source_project_name,
19982000
from_folder_name=source_folder_name,
19992001
to_project_name=destination_project_name,
20002002
to_folder_name=destination_folder,
20012003
image_name=image_name,
20022004
copy_annotation_status=copy_annotation_status,
2003-
move=True
2005+
move=True,
20042006
)
20052007
if response.errors:
20062008
raise AppException(response.errors)
@@ -2253,11 +2255,13 @@ def attach_image_urls_to_project(
22532255
annotation_status=annotation_status,
22542256
)
22552257
if use_case.is_valid():
2256-
with tqdm(total=use_case.attachments_count, desc="Attaching urls") as progress_bar:
2258+
with tqdm(
2259+
total=use_case.attachments_count, desc="Attaching urls"
2260+
) as progress_bar:
22572261
for _ in use_case.execute():
22582262
progress_bar.update(1)
22592263
uploaded, duplications = use_case.data
2260-
uploaded = [i['name'] for i in uploaded]
2264+
uploaded = [i["name"] for i in uploaded]
22612265
duplications.extend(duplicate_images)
22622266
failed_images = [
22632267
image["name"]
@@ -2304,11 +2308,13 @@ def attach_video_urls_to_project(
23042308
annotation_status=annotation_status,
23052309
)
23062310
if use_case.is_valid():
2307-
with tqdm(total=use_case.attachments_count, desc="Attaching urls") as progress_bar:
2311+
with tqdm(
2312+
total=use_case.attachments_count, desc="Attaching urls"
2313+
) as progress_bar:
23082314
for _ in use_case.execute():
23092315
progress_bar.update(1)
23102316
uploaded, duplications = use_case.data
2311-
uploaded = [i['name'] for i in uploaded]
2317+
uploaded = [i["name"] for i in uploaded]
23122318
duplications.extend(duplicate_images)
23132319
failed_images = [
23142320
image["name"]
@@ -3302,7 +3308,7 @@ def upload_image_to_project(
33023308
image=img,
33033309
annotation_status=annotation_status,
33043310
from_s3_bucket=from_s3_bucket,
3305-
image_quality_in_editor=image_quality_in_editor
3311+
image_quality_in_editor=image_quality_in_editor,
33063312
)
33073313
if response.errors:
33083314
raise AppException(response.errors)
@@ -3513,11 +3519,13 @@ def attach_document_urls_to_project(
35133519
annotation_status=annotation_status,
35143520
)
35153521
if use_case.is_valid():
3516-
with tqdm(total=use_case.attachments_count, desc="Attaching urls") as progress_bar:
3522+
with tqdm(
3523+
total=use_case.attachments_count, desc="Attaching urls"
3524+
) as progress_bar:
35173525
for _ in use_case.execute():
35183526
progress_bar.update(1)
35193527
uploaded, duplications = use_case.data
3520-
uploaded = [i['name'] for i in uploaded]
3528+
uploaded = [i["name"] for i in uploaded]
35213529
duplications.extend(duplicate_images)
35223530
failed_images = [
35233531
image["name"]

src/superannotate/lib/core/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,18 @@
8282
ATTACH_PROJECT_LIMIT_ERROR_MESSAGE = "The number of items you want to attach exceeds the limit of 500 000 items per project."
8383
ATTACH_USER_LIMIT_ERROR_MESSAGE = "The number of items you want to attach exceeds the limit of your subscription plan."
8484

85-
COPY_ITEMS_LIMIT_ERROR_MESSAGE = "The number of items you want to copy exceeds the limit of 50 000 items per folder."
86-
COPY_ITEM_PROJECT_LIMIT_ERROR_MESSAGE = "The copy exceeds the limit of 50 0000 items per project."
87-
MOVE_ITEMS_LIMIT_ERROR_MESSAGE = "The number of items you want to move exceeds the limit of 50 000 items per folder."
88-
MOVE_ITEM_PROJECT_LIMIT_ERROR_MESSAGE = "The number of items you want to move exceeds the limit of 50 000 items per folder."
85+
COPY_ITEMS_LIMIT_ERROR_MESSAGE = (
86+
"The number of items you want to copy exceeds the limit of 50 000 items per folder."
87+
)
88+
COPY_ITEM_PROJECT_LIMIT_ERROR_MESSAGE = (
89+
"The copy exceeds the limit of 50 0000 items per project."
90+
)
91+
MOVE_ITEMS_LIMIT_ERROR_MESSAGE = (
92+
"The number of items you want to move exceeds the limit of 50 000 items per folder."
93+
)
94+
MOVE_ITEM_PROJECT_LIMIT_ERROR_MESSAGE = (
95+
"The number of items you want to move exceeds the limit of 50 000 items per folder."
96+
)
8997

9098
COPY_FOLDER_LIMIT_ERROR_MESSAGE = (
9199
"The number of items you want to copy exceeds the limit of 50 000 items per folder."

0 commit comments

Comments
 (0)