mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Upgrade mypy to 0.770, tighten config a bit (#32715)
* Upgrade mypy to 0.770, related cleanups https://mypy-lang.blogspot.com/2020/03/mypy-0770-released.html * Clean up config and make it a notch stricter, address findings
This commit is contained in:
@ -109,10 +109,7 @@ class UnitSystem:
|
||||
if not isinstance(temperature, Number):
|
||||
raise TypeError(f"{temperature!s} is not a numeric value.")
|
||||
|
||||
# type ignore: https://github.com/python/mypy/issues/7207
|
||||
return temperature_util.convert( # type: ignore
|
||||
temperature, from_unit, self.temperature_unit
|
||||
)
|
||||
return temperature_util.convert(temperature, from_unit, self.temperature_unit)
|
||||
|
||||
def length(self, length: Optional[float], from_unit: str) -> float:
|
||||
"""Convert the given length to this unit system."""
|
||||
|
Reference in New Issue
Block a user