File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,11 +134,15 @@ def get_the_question(
134134
135135 questions += longrepr_list
136136
137- # Add the main directive or instruction based on whether there are failed tests
138- if questions :
139- questions .insert (0 , get_directive (human_language ))
140- else :
141- questions .insert (0 , f'In { human_language } , please comment on the student code given the assignment instruction.' )
137+ def get_initial_instruction (questions :List [str ],language :str ) -> str :
138+ # Add the main directive or instruction based on whether there are failed tests
139+ if questions :
140+ initial_instruction = get_directive (language )
141+ else :
142+ initial_instruction = f'In { language } , please comment on the student code given the assignment instruction.'
143+ return initial_instruction
144+
145+ questions = [get_initial_instruction (questions , human_language )] + questions
142146
143147 # Add the code and instructions
144148 questions .append (get_code_instruction (student_files , readme_file , human_language ))
You can’t perform that action at this time.
0 commit comments