Skip to content

Commit 8c8276a

Browse files
committed
Util.py: same same, remove unused
1 parent 8962ed6 commit 8c8276a

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

plugwise/util.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ def int_to_uint(val, octals):
8989
return val
9090

9191

92-
def escape_illegal_xml_characters(xmldata) -> str:
92+
def escape_illegal_xml_characters(xmldata: str) -> str:
9393
"""Replace illegal &-characters."""
9494
return re.sub(r"&([^a-zA-Z#])", r"&\1", xmldata)
9595

9696

97-
def format_measure(measure, unit) -> float | int | bool:
97+
def format_measure(measure: str, unit: str) -> float | int | bool:
9898
"""Format measure to correct type."""
9999
try:
100100
measure = int(measure)
@@ -123,18 +123,9 @@ def format_measure(measure, unit) -> float | int | bool:
123123
return measure
124124

125125

126-
def determine_selected(available, selected, schemas) -> tuple[str, str]:
127-
"""Determine selected schema from available schemas."""
128-
for schema, active in schemas.items():
129-
if "None" in available:
130-
available.remove("None")
131-
available.append(schema)
132-
if active:
133-
selected = schema
134-
return available, selected
135-
136-
137-
def in_between(now, start, end) -> datetime.time:
126+
def in_between(
127+
now: datetime.time, start: datetime.time, end: datetime.time
128+
) -> datetime.time:
138129
"""Determine timing for schedules."""
139130
if start <= end:
140131
return start <= now < end

0 commit comments

Comments
 (0)