We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e817cd commit 619e2d8Copy full SHA for 619e2d8
plugwise/util.py
@@ -150,9 +150,9 @@ def escape_illegal_xml_characters(xmldata: str) -> str:
150
return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata)
151
152
153
-def format_measure(measure: str, unit: str) -> float:
+def format_measure(measure: str, unit: str) -> float | int:
154
"""Format measure to correct type."""
155
- result: float = 0.0
+ result: float | int = 0
156
157
float_measure = float(measure)
158
if unit == PERCENTAGE and 0 < float_measure <= 1:
0 commit comments