api: Conform to `cros lint'

Fix formatting issues that cause pylint to complain and preupload hooks
to fail.

BUG=none
TEST=for f in $(find . -path "./gen*" -prune -o -iname "*.py" -print);
do cros lint $f; done
TEST=unit, just for comfort of confirmation

Change-Id: Id770ca57a96c6691b8dce22f019f2f95d7eb2a49
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3277512
Auto-Submit: Lizzy Presland <zland@google.com>
Commit-Queue: Lizzy Presland <zland@google.com>
Tested-by: Lizzy Presland <zland@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/api/validate.py b/api/validate.py
index c2ebc44..7501c0e 100644
--- a/api/validate.py
+++ b/api/validate.py
@@ -197,11 +197,11 @@
             failed.append((val, msg))
 
         if failed:
-          msg = '{}.[all] one or more values failed check "{}"\n'.format(
-              field, constraint_description)
+          msg = f'{field}.[all] one or more values failed check ' \
+                f'"{constraint_description}"\n'
 
           for value, msg in failed:
-            msg += '  {}: {}\n'.format(value, msg)
+            msg += '  %s: %s\n' % (value, msg)
           cros_build_lib.Die(msg)
 
       return func(input_proto, output_proto, config, *args, **kwargs)