
...
Another thing I'm not a fan of is having the message start at column zero instead of being aligned along with the rest of the code... textwrap.dedent() could help here, although it'd be a little annoying to use because we want the image details to be indented and we can't know the correct indent in advance, so we'd have to do a two-step process along the lines of
msg = textwrap.dedent(f""" The following images are stale and can be purged from the registry:
STALE_DETAILS
... """) print(msg.replace("STALE_DETAILS", stale_details))
A bit more cumbersome, but still preferable when it comes to readability IMHO.
So, I figured it would be more convenient to send a new revision rather than continue the discussion here, so basically apart from ^this last request for using textwrap.dedent I incorporated all your comments and we can discuss the text wrapping further in there. [v3] https://listman.redhat.com/archives/libvir-list/2021-March/msg00892.html Regards, Erik