diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 392040d9..02c9a824 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ default_language_version: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.1 hooks: - id: ruff args: diff --git a/deebot_client/commands/json/__init__.py b/deebot_client/commands/json/__init__.py index aadc2e5e..384e2697 100644 --- a/deebot_client/commands/json/__init__.py +++ b/deebot_client/commands/json/__init__.py @@ -54,42 +54,30 @@ from .common import JsonCommand __all__ = [ + "Charge", + "Clean", + "CleanArea", + "CleanV2", + "ClearMap", "GetAdvancedMode", - "SetAdvancedMode", "GetBattery", "GetBorderSwitch", - "SetBorderSwitch", + "GetCachedMapInfo", "GetCarpetAutoFanBoost", - "SetCarpetAutoFanBoost", - "GetCleanCount", - "SetCleanCount", - "GetCleanPreference", - "SetCleanPreference", - "ClearMap", - "Charge", - "GetChildLock", - "SetChildLock", "GetChargeState", - "Clean", - "CleanV2", - "CleanArea", + "GetChildLock", + "GetCleanCount", "GetCleanInfo", "GetCleanInfoV2", "GetCleanLogs", + "GetCleanPreference", "GetContinuousCleaning", - "SetContinuousCleaning", - "SetCutDirection", - "GetCutDirection", "GetCrossMapBorderWarning", - "SetCrossMapBorderWarning", + "GetCutDirection", "GetEfficiencyMode", - "SetEfficiencyMode", "GetError", "GetFanSpeed", - "SetFanSpeed", "GetLifeSpan", - "ResetLifeSpan", - "GetCachedMapInfo", "GetMajorMap", "GetMapSet", "GetMapSetV2", @@ -97,30 +85,42 @@ "GetMapTrace", "GetMinorMap", "GetMoveUpWarning", - "SetMoveUpWarning", "GetMultimapState", - "SetMultimapState", "GetNetInfo", "GetOta", - "SetOta", - "PlaySound", "GetPos", - "SetRelocationState", "GetSafeProtect", - "SetSafeProtect", "GetStats", "GetSweepMode", - "SetSweepMode", "GetTotalStats", "GetTrueDetect", - "SetTrueDetect", "GetVoiceAssistantState", - "SetVoiceAssistantState", "GetVolume", - "SetVolume", "GetWaterInfo", - "SetWaterInfo", "GetWorkMode", + "PlaySound", + "ResetLifeSpan", + "SetAdvancedMode", + "SetBorderSwitch", + "SetCarpetAutoFanBoost", + "SetChildLock", + "SetCleanCount", + "SetCleanPreference", + "SetContinuousCleaning", + "SetCrossMapBorderWarning", + "SetCutDirection", + "SetEfficiencyMode", + "SetFanSpeed", + "SetMoveUpWarning", + "SetMultimapState", + "SetOta", + "SetRelocationState", + "SetSafeProtect", + "SetSweepMode", + "SetTrueDetect", + "SetVoiceAssistantState", + "SetVolume", + "SetWaterInfo", "SetWorkMode", ] diff --git a/deebot_client/util/__init__.py b/deebot_client/util/__init__.py index 3f0d914b..3d8f2a5c 100644 --- a/deebot_client/util/__init__.py +++ b/deebot_client/util/__init__.py @@ -96,10 +96,10 @@ def __init__( super().__init__(iterable) self._on_change = on_change - def __getattribute__(self, __name: str) -> Any: - if __name in OnChangedList._MODIFYING_FUNCTIONS: + def __getattribute__(self, name: str, /) -> Any: + if name in OnChangedList._MODIFYING_FUNCTIONS: self._on_change() - return super().__getattribute__(__name) + return super().__getattribute__(name) _KT = TypeVar("_KT") @@ -124,10 +124,10 @@ def __init__( super().__init__(iterable) self._on_change = on_change - def __getattribute__(self, __name: str) -> Any: - if __name in OnChangedDict._MODIFYING_FUNCTIONS: + def __getattribute__(self, name: str, /) -> Any: + if name in OnChangedDict._MODIFYING_FUNCTIONS: self._on_change() - return super().__getattribute__(__name) + return super().__getattribute__(name) LST = list[_T] | set[_T] | tuple[_T, ...] diff --git a/pyproject.toml b/pyproject.toml index a30a9e13..ccadde88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,8 +65,6 @@ select = [ ] ignore = [ - "ANN101", # Self... explanatory - "ANN102", # Cls... explanatory "ANN401", # Opinioated warning on disallowing dynamically typed expressions "D203", # Conflicts with other rules "D213", # Conflicts with other rules