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:
committed by
Paulus Schoutsen
parent
1efa29d6ff
commit
decf13b948
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user