Преглед изворни кода

fix(entity): wrong comment syntax for Python

Jason Rumney пре 2 месеци
родитељ
комит
eabf89f824
1 измењених фајлова са 6 додато и 2 уклоњено
  1. 6 2
      custom_components/tuya_local/entity.py

+ 6 - 2
custom_components/tuya_local/entity.py

@@ -103,13 +103,17 @@ class TuyaLocalEntity:
         for a in self._attr_dps:
             value = a.get_value(self._device)
             if value is not None or not a.optional:
-                // Decode json attributes for user convenience
+                # Decode json attributes for user convenience
                 if a.rawtype == "json":
                     try:
                         value = json.loads(value)
                     except json.JSONDecodeError:
                         if value is not None:
-                            _LOGGER.warning("Failed to decode JSON for attribute %s: %s", a.name, value)
+                            _LOGGER.warning(
+                                "Failed to decode JSON for attribute %s: %s",
+                                a.name,
+                                value,
+                            )
                 attr[a.name] = value
         return attr