mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Update poetry locks and pre-commit hooks (#837)
Also updates CI pypy versions to be 3.9 and 3.10 which are the currently [supported versions](https://www.pypy.org/posts/2024/01/pypy-v7315-release.html). Otherwise latest cryptography doesn't ship with pypy3.8 wheels and is unable to build on windows. Also updates the `codecov-action` to v4 which fixed some intermittent uploading errors.
This commit is contained in:
@@ -302,9 +302,9 @@ class FakeIotProtocol(IotProtocol):
|
||||
|
||||
def set_preferred_state(self, new_state, *args):
|
||||
"""Implement set_preferred_state."""
|
||||
self.proto["system"]["get_sysinfo"]["preferred_state"][
|
||||
new_state["index"]
|
||||
] = new_state
|
||||
self.proto["system"]["get_sysinfo"]["preferred_state"][new_state["index"]] = (
|
||||
new_state
|
||||
)
|
||||
|
||||
def light_state(self, x, *args):
|
||||
light_state = self.proto["system"]["get_sysinfo"]["light_state"]
|
||||
|
@@ -15,7 +15,7 @@ class FixtureInfo(NamedTuple):
|
||||
data: Dict
|
||||
|
||||
|
||||
FixtureInfo.__hash__ = lambda x: hash((x.name, x.protocol)) # type: ignore[attr-defined, method-assign]
|
||||
FixtureInfo.__hash__ = lambda self: hash((self.name, self.protocol)) # type: ignore[attr-defined, method-assign]
|
||||
FixtureInfo.__eq__ = lambda x, y: hash(x) == hash(y) # type: ignore[method-assign]
|
||||
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
"""Tests for all devices."""
|
||||
|
||||
import importlib
|
||||
import inspect
|
||||
import pkgutil
|
||||
|
@@ -1,4 +1,5 @@
|
||||
"""Module for common iotdevice tests."""
|
||||
|
||||
import re
|
||||
from datetime import datetime
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
"""Tests for SMART devices."""
|
||||
|
||||
import logging
|
||||
from typing import Any, Dict
|
||||
|
||||
|
Reference in New Issue
Block a user