mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-07 11:14:02 +00:00
Drop python3.8 support (#992)
Drop support for soon-to-be eol'd python 3.8. This will allow some minor cleanups & makes it easier to add support for timezones. Related to https://github.com/python-kasa/python-kasa/issues/980#issuecomment-2170889543
This commit is contained in:
@@ -4,8 +4,9 @@ from __future__ import annotations
|
||||
|
||||
import base64
|
||||
import logging
|
||||
from collections.abc import Mapping, Sequence
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from typing import TYPE_CHECKING, Any, Mapping, Sequence, cast
|
||||
from typing import Any, cast
|
||||
|
||||
from ..aestransport import AesTransport
|
||||
from ..device import Device, WifiNetwork
|
||||
@@ -97,9 +98,7 @@ class SmartDevice(Device):
|
||||
@property
|
||||
def modules(self) -> ModuleMapping[SmartModule]:
|
||||
"""Return the device modules."""
|
||||
if TYPE_CHECKING: # Needed for python 3.8
|
||||
return cast(ModuleMapping[SmartModule], self._modules)
|
||||
return self._modules
|
||||
return cast(ModuleMapping[SmartModule], self._modules)
|
||||
|
||||
def _try_get_response(self, responses: dict, request: str, default=None) -> dict:
|
||||
response = responses.get(request)
|
||||
|
Reference in New Issue
Block a user