(pred_expr, gt_answer)
| 77 | return short_name == truncated_full_name |
| 78 | |
| 79 | def lenient_matcher(pred_expr, gt_answer): |
| 80 | if pred_expr == gt_answer: # Exact Matching |
| 81 | return True |
| 82 | |
| 83 | try: |
| 84 | pred_method_name, pred_arg_types = get_method_name_and_argument_types(pred_expr) |
| 85 | except: |
| 86 | return False # not a valid signature |
| 87 | |
| 88 | gt_method_name, gt_arg_types = get_method_name_and_argument_types(gt_answer) |
| 89 | |
| 90 | return len(pred_method_name) >= 2 \ |
| 91 | and name_matcher(pred_method_name, gt_method_name) \ |
| 92 | and gt_arg_types == pred_arg_types |
| 93 | |
| 94 | def python_lenient_matcher(pred, buggy_method): |
| 95 | return pred.split('(')[0] == buggy_method.split('(')[0] |
nothing calls this directly
no test coverage detected