File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -62,17 +62,16 @@ def extract_feedback_counts(feedback: str) -> Tuple[int, int]:
6262 return (0 , 0 )
6363
6464 segments = [
65- segment .strip () for segment in feedback .split ("\n \n " ) if segment .strip ()
65+ segment .strip () for segment in feedback .split ("\n " ) if segment .strip ()
6666 ]
67- if not segments :
67+ if len ( segments ) < 2 :
6868 return (0 , 0 )
6969
70- latest_segment = segments [- 1 ]
71- lines = [line .strip () for line in latest_segment .splitlines () if line .strip ()]
72- latest_line = lines [- 1 ] if lines else latest_segment
70+ marker_line = segments [1 ]
71+
72+ green_count = marker_line .count ("G" )
73+ yellow_count = marker_line .count ("Y" )
7374
74- green_count = latest_line .count ("G" )
75- yellow_count = latest_line .count ("Y" )
7675 return (green_count , yellow_count )
7776
7877
You can’t perform that action at this time.
0 commit comments