Skip to content

Commit

Permalink
Add linebreak between each check result (#117)
Browse files Browse the repository at this point in the history
For better readability.
  • Loading branch information
agoscinski authored Jan 6, 2025
1 parent 9f49210 commit f86cf7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/scwidgets/exercise/_widget_code_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def compute_output_to_check(self, *args, **kwargs) -> Check.FunOutParamsT:
def handle_checks_result(self, results: List[Union[CheckResult, Exception]]):
self._output.clear_output(wait=True)
with self._output:
for result in results:
for i, result in enumerate(results):
if isinstance(result, Exception):
raise result
elif isinstance(result, CheckResult):
Expand All @@ -681,6 +681,9 @@ def handle_checks_result(self, results: List[Union[CheckResult, Exception]]):
print(result.message())
else:
print(result)
# add linebreak if not end
if i != len(results):
print()

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

0 comments on commit f86cf7a

Please sign in to comment.