瀏覽代碼

Black reformatting

Jason Rumney 2 年之前
父節點
當前提交
3138fe3d47
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      custom_components/tuya_local/device.py

+ 4 - 2
custom_components/tuya_local/device.py

@@ -455,7 +455,8 @@ class TuyaLocalDevice(object):
 
     def _remove_properties_from_pending_updates(self, data):
         self._pending_updates = {
-            key: value for key, value in self._pending_updates.items()
+            key: value
+            for key, value in self._pending_updates.items()
             if key not in data or not value["sent"] or data[key] != value["value"]
         }
 
@@ -568,7 +569,8 @@ class TuyaLocalDevice(object):
         self._pending_updates = {
             key: value
             for key, value in self._pending_updates.items()
-            if not value["sent"] or now - value.get("updated_at", 0) < self._FAKE_IT_TIMEOUT
+            if not value["sent"]
+            or now - value.get("updated_at", 0) < self._FAKE_IT_TIMEOUT
         }
         return self._pending_updates