File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 25
25
)
26
26
27
27
28
+ def print_output (output : GitAutograderOutput ) -> None :
29
+ color = (
30
+ "bright_green"
31
+ if output .status == GitAutograderStatus .SUCCESSFUL
32
+ else "bright_red"
33
+ if output .status == GitAutograderStatus .UNSUCCESSFUL
34
+ else "bright_yellow"
35
+ )
36
+ info ("Verification completed." )
37
+ info ("" )
38
+ info (f"{ click .style ('Status:' , bold = True )} { click .style (output .status , fg = color )} " )
39
+ info (click .style ("Comments:" , bold = True ))
40
+ print ("\n " .join ([f"\t - { comment } " for comment in (output .comments or [])]))
41
+
42
+
28
43
def submit_progress (output : GitAutograderOutput , verbose : bool ) -> None :
29
44
# TODO: handle edge cases where the student might have deleted progress themselves
30
45
gitmastery_root = find_gitmastery_root ()
@@ -160,10 +175,5 @@ def verify(ctx: click.Context) -> None:
160
175
)
161
176
162
177
assert output is not None
163
- info ("Verification completed." )
164
- info ("" )
165
- info (f"{ click .style ('Status:' , bold = True )} { output .status } " )
166
- info (click .style ("Comments:" , bold = True ))
167
- print ("\n " .join ([f"\t - { comment } " for comment in (output .comments or [])]))
168
-
178
+ print_output (output )
169
179
submit_progress (output , verbose )
You can’t perform that action at this time.
0 commit comments