Fix H501: Do not use locals() for string formatting

Change-Id: Ide587d3311c22f698a82eeee210c5bdbe24eb484
Merge "Fix H501: Do not use locals() for string formatting"