Use `!r` conversion with `str.format()` over older `%` formatting

I noticed that you used `str.format()` in a few places.  I also noticed that in all the places you were still using the older `%` formatting style, you were calling `repr()` on the object to be formatted.

This commit retains the `repr()` format for these objects using `str.format()`'s `!r` conversion, resulting in a consistent string-formatting style throughout. :)