Use literal string interpolation in core (f-strings) (#26166)

This commit is contained in:
Franck Nijhof authored and Paulus Schoutsen committed 2019-08-23 09:53:33 -07:00
1 parent 1efa29d6ff
commit decf13b948
67 files changed
+180 -246

No files matched your search

@@ -43,9 +43,7 @@ class RequestDataValidator:
kwargs["data"] = self._schema(data)
except vol.Invalid as err:
_LOGGER.error("Data does not match schema: %s", err)
return view.json_message(
"Message format incorrect: {}".format(err), 400
)
return view.json_message(f"Message format incorrect: {err}", 400)
result = await method(view, request, *args, **kwargs)
return result