@@ -323,7 +323,7 @@ def rm(self, i):
323323 if item_name :
324324 inp ['alias' ] = item_name
325325 inp ['folder_name' ] = item_name #we dont know if the user gave the alias or the folder name, we first check for alias and then the folder name
326- if self .is_uid (item_name ):
326+ if utils .is_uid (item_name ):
327327 inp ['uid' ] = item_name
328328 elif item_id :
329329 inp ['uid' ] = item_id
@@ -479,21 +479,6 @@ def update(self, i):
479479
480480 return {'return' : 0 , 'message' : f"Tags updated successfully for { len (found_items )} item(s)." , 'list' : found_items }
481481
482- def is_uid (self , name ):
483- """
484- Checks if the given name is a 16-digit hexadecimal UID.
485-
486- Args:
487- name (str): The string to check.
488-
489- Returns:
490- bool: True if the name is a 16-digit hexadecimal UID, False otherwise.
491- """
492- # Define a regex pattern for a 16-digit hexadecimal UID
493- hex_uid_pattern = r"^[0-9a-fA-F]{16}$"
494-
495- # Check if the name matches the pattern
496- return bool (re .fullmatch (hex_uid_pattern , name ))
497482
498483
499484 def cp (self , run_args ):
@@ -519,7 +504,7 @@ def cp(self, run_args):
519504 inp ['alias' ] = src_item
520505 inp ['folder_name' ] = src_item #we dont know if the user gave the alias or the folder name, we first check for alias and then the folder name
521506
522- if self .is_uid (src_item ):
507+ if utils .is_uid (src_item ):
523508 inp ['uid' ] = src_item
524509 src_id = src_item
525510 else :
@@ -678,7 +663,7 @@ def search(self, i):
678663 alias = details_split [0 ]
679664 uid = details_split [1 ]
680665 else :
681- if self .is_uid (details_split [0 ]):
666+ if utils .is_uid (details_split [0 ]):
682667 uid = details_split [0 ]
683668 else :
684669 alias = details_split [0 ]
0 commit comments