Skip to content

Commit 619e2d8

Browse files
committed
Return int-typing
1 parent 5e817cd commit 619e2d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ def escape_illegal_xml_characters(xmldata: str) -> str:
150150
return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata)
151151

152152

153-
def format_measure(measure: str, unit: str) -> float:
153+
def format_measure(measure: str, unit: str) -> float | int:
154154
"""Format measure to correct type."""
155-
result: float = 0.0
155+
result: float | int = 0
156156

157157
float_measure = float(measure)
158158
if unit == PERCENTAGE and 0 < float_measure <= 1:

0 commit comments

Comments
 (0)