Skip to content

Commit

Permalink
Print empty char after updated code exercise
Browse files Browse the repository at this point in the history
To enforce `clear_output` even when the update is not printing anything
we used `print("", end"")` this seems not to always work so we print an
empty char now.
  • Loading branch information
agoscinski committed Nov 29, 2024
1 parent eb1e3a9 commit 2d8225f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scwidgets/exercise/_widget_code_exercise.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,8 @@ def _on_click_update_action(self) -> bool:

# The clear_output command at the beginning of the function waits till
# something is printed. If nothing is printed, it is not cleared. We
# enforce it to be invoked by printing an empty string
print("", end="")
# enforce it to be invoked by printing an empty char
print("\0", end="")

return not (raised_error)

Expand Down

0 comments on commit 2d8225f

Please sign in to comment.