Skip to content

Commit f86cf7a

Browse files
authored
Add linebreak between each check result (#117)
For better readability.
1 parent 9f49210 commit f86cf7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scwidgets/exercise/_widget_code_exercise.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def compute_output_to_check(self, *args, **kwargs) -> Check.FunOutParamsT:
667667
def handle_checks_result(self, results: List[Union[CheckResult, Exception]]):
668668
self._output.clear_output(wait=True)
669669
with self._output:
670-
for result in results:
670+
for i, result in enumerate(results):
671671
if isinstance(result, Exception):
672672
raise result
673673
elif isinstance(result, CheckResult):
@@ -681,6 +681,9 @@ def handle_checks_result(self, results: List[Union[CheckResult, Exception]]):
681681
print(result.message())
682682
else:
683683
print(result)
684+
# add linebreak if not end
685+
if i != len(results):
686+
print()
684687

685688
def handle_save_result(self, result: Union[str, Exception]):
686689
self._output.clear_output(wait=True)

0 commit comments

Comments
 (0)