Skip to content

Conversation

odisseus
Copy link

@odisseus odisseus commented Apr 9, 2024

Closes #236.

timer_format = self._timer if isinstance(self._timer, str) else " ({}.{:02.0f})"
sec, fsec = divmod(round(100 * self.elapsed_time), 100)
text += " ({}.{:02.0f})".format( # pylint: disable=consider-using-f-string
text += timer_format.format( # pylint: disable=consider-using-f-string
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if timer_format has no slots or only one slot (while .format() is called with 2 arguments) or more than 2 slots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customised timer format

2 participants