MCPcopy Create free account
hub / github.com/X-PLUG/MobileAgent / check_subtask_dict

Function check_subtask_dict

PC-Agent/run.py:520–540  ·  view source on GitHub ↗
(subtask_dict)

Source from the content-addressed store, hash-verified

518 return True
519
520def check_subtask_dict(subtask_dict):
521 num_subtask = len(list(subtask_dict.keys()))
522 all_dict = {}
523 for i in range(num_subtask):
524 value = subtask_dict['subtask %d'%(i+1)]
525 if is_good_string(value) == False:
526 return False
527
528 res = analyze_string(subtask_dict['subtask %d'%(i+1)])
529 if res['type'] in [2, 4]:
530 this_format_keys = res['format_keys']
531 for format_key in this_format_keys:
532 if format_key not in all_dict:
533 return False
534 if res['type'] in [3, 4]:
535 this_dict = res['dict_content']
536 for k, v in this_dict.items():
537 if k in all_dict:
538 return False
539 all_dict[k] = v
540 return True
541
542
543output_for_save = []

Callers 1

run.pyFile · 0.85

Calls 2

is_good_stringFunction · 0.85
analyze_stringFunction · 0.85

Tested by

no test coverage detected