Skip to content

Commit cbac4f7

Browse files
committed
Last typing updates for now.
1 parent 78323ff commit cbac4f7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

plugwise/helper.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ async def _request_validate(self, resp, method) -> etree:
238238
async def _request(
239239
self,
240240
command: str,
241-
retry: int = 3,
242-
method: str = "get",
243-
data: str = None,
244-
headers: dict[str, str] = None,
241+
retry=3,
242+
method="get",
243+
data: str | None = None,
244+
headers: dict[str, str] | None = None,
245245
) -> etree:
246246
"""Get/put/delete data from a give URL."""
247247
resp: ClientResponse | None = None
@@ -281,19 +281,19 @@ class SmileHelper:
281281
def __init__(self):
282282
"""Set the constructor for this class."""
283283
self._appl_data: dict[str, Any] = {}
284-
self._appliances: etree = None
284+
self._appliances: etree | None = None
285285
self._cooling_present = False
286286
self._devices: dict[str, str] = {}
287-
self._domain_objects: etree = None
288-
self._heater_id: str = None
289-
self._home_location: str = None
287+
self._domain_objects: etree | None = None
288+
self._heater_id: str | None = None
289+
self._home_location: str | None = None
290290
self._last_active: dict[str, str] = {}
291291
self._loc_data: dict[str, Any] = {}
292-
self._locations: etree = None
293-
self._modules: etree = None
292+
self._locations: etree | None = None
293+
self._modules: etree | None = None
294294
self._on_off_device = False
295295
self._opentherm_device = False
296-
self._outdoor_temp: float = None
296+
self._outdoor_temp: float | None = None
297297
self._is_thermostat = False
298298
self._multi_thermostats = False
299299
self._smile_legacy = False
@@ -302,11 +302,11 @@ def __init__(self):
302302
self._thermo_locs: dict[str, Any] = {}
303303

304304
self.cooling_active = False
305-
self.gateway_id: str = None
305+
self.gateway_id: str | None = None
306306
self.gw_data: dict[str, Any] = {}
307307
self.gw_devices: dict[str, Any] = {}
308-
self.smile_name: str = None
309-
self.smile_type: str = None
308+
self.smile_name: str | None = None
309+
self.smile_type: str | None = None
310310
self.smile_version: list[str] = []
311311

312312
def _locations_legacy(self) -> None:
@@ -355,7 +355,7 @@ def _locations_specials(self, loc, location) -> Munch:
355355

356356
def _all_locations(self) -> None:
357357
"""Collect all locations."""
358-
loc: Munch = Munch()
358+
loc = Munch()
359359

360360
# Legacy Anna without outdoor_temp and Stretches have no locations, create one containing all appliances
361361
if len(self._locations) == 0 and self._smile_legacy:
@@ -663,7 +663,7 @@ def _presets_legacy(self) -> dict[str, Any]:
663663

664664
return preset_dictionary
665665

666-
def _presets(self, loc_id) -> dict[str, Any]:
666+
def _presets(self, loc_id: str) -> dict[str, Any]:
667667
"""Collect Presets for a Thermostat based on location_id."""
668668
presets: dict[str, Any] = {}
669669
tag_1 = "zone_setpoint_and_state_based_on_preset"

0 commit comments

Comments
 (0)