From f9d0bce47d7339079fc6ec50f89fe8f5870a6de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Michalak-Szmaci=C5=84ski?= Date: Fri, 30 Jun 2023 09:54:18 +0000 Subject: [PATCH] Fix use GeneratedObjects for remove noqa --- src/controller/python/chip/ChipDeviceCtrl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index aa15c602c6f75f..4e4f7752d2d580 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -49,7 +49,7 @@ from .clusters import Attribute as ClusterAttribute from .clusters import ClusterObjects as ClusterObjects from .clusters import Command as ClusterCommand -from .clusters import Objects as GeneratedObjects # noqa: F401 Need for eval +from .clusters import Objects as GeneratedObjects from .clusters.CHIPClusters import ChipClusters from .crypto import p256keypair from .exceptions import UnknownAttribute, UnknownCommand @@ -1199,7 +1199,7 @@ def ZCLSend(self, cluster, command, nodeid, endpoint, groupid, args, blocking=Fa def ZCLReadAttribute(self, cluster, attribute, nodeid, endpoint, groupid, blocking=True): self.CheckIsActive() - clusterType = eval(f"GeneratedObjects.{cluster}") + clusterType = getattr(GeneratedObjects, cluster) try: attributeType = eval(