@@ -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 )
@@ -994,7 +994,9 @@ def delete_image(project: Union[NotEmptyStr, dict], image_name: str):
994994
995995@Trackable
996996@validate_arguments
997- def get_image_metadata (project : Union [NotEmptyStr , dict ], image_name : str , * args , ** kwargs ):
997+ def get_image_metadata (
998+ project : Union [NotEmptyStr , dict ], image_name : str , * args , ** kwargs
999+ ):
9981000 """Returns image metadata
9991001
10001002 :param project: project name or folder path (e.g., "project1/folder1")
@@ -1992,15 +1994,17 @@ def move_image(
19921994 :type copy_pin: bool
19931995 """
19941996 source_project_name , source_folder_name = extract_project_folder (source_project )
1995- destination_project_name , destination_folder = extract_project_folder (destination_project )
1997+ destination_project_name , destination_folder = extract_project_folder (
1998+ destination_project
1999+ )
19962000 response = controller .copy_image (
19972001 from_project_name = source_project_name ,
19982002 from_folder_name = source_folder_name ,
19992003 to_project_name = destination_project_name ,
20002004 to_folder_name = destination_folder ,
20012005 image_name = image_name ,
20022006 copy_annotation_status = copy_annotation_status ,
2003- move = True
2007+ move = True ,
20042008 )
20052009 if response .errors :
20062010 raise AppException (response .errors )
@@ -2253,11 +2257,13 @@ def attach_image_urls_to_project(
22532257 annotation_status = annotation_status ,
22542258 )
22552259 if use_case .is_valid ():
2256- with tqdm (total = use_case .attachments_count , desc = "Attaching urls" ) as progress_bar :
2257- for _ in use_case .execute ():
2258- progress_bar .update (1 )
2260+ with tqdm (
2261+ total = use_case .attachments_count , desc = "Attaching urls"
2262+ ) as progress_bar :
2263+ for attached in use_case .execute ():
2264+ progress_bar .update (attached )
22592265 uploaded , duplications = use_case .data
2260- uploaded = [i [' name' ] for i in uploaded ]
2266+ uploaded = [i [" name" ] for i in uploaded ]
22612267 duplications .extend (duplicate_images )
22622268 failed_images = [
22632269 image ["name" ]
@@ -2304,11 +2310,13 @@ def attach_video_urls_to_project(
23042310 annotation_status = annotation_status ,
23052311 )
23062312 if use_case .is_valid ():
2307- with tqdm (total = use_case .attachments_count , desc = "Attaching urls" ) as progress_bar :
2308- for _ in use_case .execute ():
2309- progress_bar .update (1 )
2313+ with tqdm (
2314+ total = use_case .attachments_count , desc = "Attaching urls"
2315+ ) as progress_bar :
2316+ for attached in use_case .execute ():
2317+ progress_bar .update (attached )
23102318 uploaded , duplications = use_case .data
2311- uploaded = [i [' name' ] for i in uploaded ]
2319+ uploaded = [i [" name" ] for i in uploaded ]
23122320 duplications .extend (duplicate_images )
23132321 failed_images = [
23142322 image ["name" ]
@@ -3302,7 +3310,7 @@ def upload_image_to_project(
33023310 image = img ,
33033311 annotation_status = annotation_status ,
33043312 from_s3_bucket = from_s3_bucket ,
3305- image_quality_in_editor = image_quality_in_editor
3313+ image_quality_in_editor = image_quality_in_editor ,
33063314 )
33073315 if response .errors :
33083316 raise AppException (response .errors )
@@ -3513,11 +3521,13 @@ def attach_document_urls_to_project(
35133521 annotation_status = annotation_status ,
35143522 )
35153523 if use_case .is_valid ():
3516- with tqdm (total = use_case .attachments_count , desc = "Attaching urls" ) as progress_bar :
3517- for _ in use_case .execute ():
3518- progress_bar .update (1 )
3524+ with tqdm (
3525+ total = use_case .attachments_count , desc = "Attaching urls"
3526+ ) as progress_bar :
3527+ for attached in use_case .execute ():
3528+ progress_bar .update (attached )
35193529 uploaded , duplications = use_case .data
3520- uploaded = [i [' name' ] for i in uploaded ]
3530+ uploaded = [i [" name" ] for i in uploaded ]
35213531 duplications .extend (duplicate_images )
35223532 failed_images = [
35233533 image ["name" ]
0 commit comments