Просмотр исходного кода

cleanup: Remove unnecessary parens

Seems like ruff just updated its rules, or it acts differently when run from uv.
Jason Rumney 1 месяц назад
Родитель
Сommit
df3907fb6e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      custom_components/tuya_local/helpers/device_config.py

+ 1 - 1
custom_components/tuya_local/helpers/device_config.py

@@ -552,7 +552,7 @@ class TuyaDpsConfig:
         if self.rawtype == "bitfield" and matchdata:
             try:
                 return (int(value) & int(matchdata)) != 0
-            except (TypeError, ValueError):
+            except TypeError, ValueError:
                 return False
         else:
             return str(value) == str(matchdata)