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
@@ -34,7 +34,7 @@ def convert(value: float, unit_1: str, unit_2: str) -> float:
|
||||
raise ValueError(UNIT_NOT_RECOGNIZED_TEMPLATE.format(unit_2, PRESSURE))
|
||||
|
||||
if not isinstance(value, Number):
|
||||
raise TypeError("{} is not of numeric type".format(value))
|
||||
raise TypeError(f"{value} is not of numeric type")
|
||||
|
||||
# type ignore: https://github.com/python/mypy/issues/7207
|
||||
if unit_1 == unit_2 or unit_1 not in VALID_UNITS: # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user