MCPcopy
hub / github.com/bregman-arie/devops-exercises / get_answered_questions

Function get_answered_questions

scripts/question_utils.py:32–45  ·  view source on GitHub ↗
(file_content: str)

Source from the content-addressed store, hash-verified

30
31
32def get_answered_questions(file_content: str) -> List[str]:
33 details = DETAILS_PATTERN.findall(file_content)
34 answered = []
35 for detail in details:
36 summary_match = SUMMARY_PATTERN.search(detail)
37 b_match = B_PATTERN.search(detail)
38 if (
39 summary_match
40 and b_match
41 and summary_match.group(1).strip()
42 and b_match.group(1).strip()
43 ):
44 answered.append(summary_match.group(1))
45 return answered
46
47
48def get_answers_count() -> List[int]:

Callers 4

test_case_1Method · 0.90
test_case_2Method · 0.90
get_answers_countFunction · 0.85
get_random_questionFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_case_1Method · 0.72
test_case_2Method · 0.72