1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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

This commit is contained in:
Franck Nijhof
2019-08-23 18:53:33 +02:00
committed by Paulus Schoutsen
parent 1efa29d6ff
commit decf13b948
67 changed files with 180 additions and 246 deletions

View File

@@ -20,7 +20,7 @@ def display_temp(
# If the temperature is not a number this can cause issues
# with Polymer components, so bail early there.
if not isinstance(temperature, Number):
raise TypeError("Temperature is not a number: {}".format(temperature))
raise TypeError(f"Temperature is not a number: {temperature}")
# type ignore: https://github.com/python/mypy/issues/7207
if temperature_unit != ha_unit: # type: ignore