@@ -282,9 +282,9 @@ def verify_attribute_path(self, read_response: dict, path: AttributePath):
282282 # Extra assertion to ensure cluster_id exists before accessing (defense in depth)
283283 asserts .assert_in (cluster_id , read_response .tlvAttributes [ep ],
284284 f"Cluster { cluster_id } not found in endpoint { ep } " )
285- returned_attrs = sorted ([ x for x in read_response .tlvAttributes [ep ][cluster_id ].keys ()] )
286- attr_list = sorted ([ x for x in read_response .tlvAttributes [ep ][cluster_id ][
287- ClusterObjects .ALL_CLUSTERS [cluster_id ].Attributes .AttributeList .attribute_id ]] )
285+ returned_attrs = sorted (list ( read_response .tlvAttributes [ep ][cluster_id ].keys ()) )
286+ attr_list = sorted (list ( read_response .tlvAttributes [ep ][cluster_id ][
287+ ClusterObjects .ALL_CLUSTERS [cluster_id ].Attributes .AttributeList .attribute_id ]) )
288288 asserts .assert_equal (
289289 returned_attrs ,
290290 attr_list ,
@@ -326,7 +326,7 @@ def verify_all_endpoints_clusters(self, read_response: dict):
326326 "PartsList attribute should always be present" )
327327
328328 # Server list matches returned clusters
329- returned_clusters = sorted (list ( read_response .tlvAttributes [endpoint ].keys () ))
329+ returned_clusters = sorted (read_response .tlvAttributes [endpoint ].keys ())
330330 server_list = sorted (read_response .tlvAttributes [endpoint ][Clusters .Descriptor .id ][
331331 Clusters .Descriptor .Attributes .ServerList .attribute_id ])
332332 asserts .assert_equal (returned_clusters , server_list ,
@@ -339,9 +339,9 @@ def verify_all_endpoints_clusters(self, read_response: dict):
339339 if global_attribute_ids .cluster_id_type (cluster ) != global_attribute_ids .ClusterIdType .kStandard :
340340 continue
341341
342- returned_attrs = sorted ([ x for x in read_response .tlvAttributes [endpoint ][cluster ].keys ()] )
343- attr_list = sorted ([ x for x in read_response .tlvAttributes [endpoint ][cluster ][
344- ClusterObjects .ALL_CLUSTERS [cluster ].Attributes .AttributeList .attribute_id ]] )
342+ returned_attrs = sorted (list ( read_response .tlvAttributes [endpoint ][cluster ].keys ()) )
343+ attr_list = sorted (list ( read_response .tlvAttributes [endpoint ][cluster ][
344+ ClusterObjects .ALL_CLUSTERS [cluster ].Attributes .AttributeList .attribute_id ]) )
345345 asserts .assert_equal (returned_attrs , attr_list ,
346346 f"Mismatch for { cluster } at endpoint { endpoint } " )
347347
@@ -407,7 +407,7 @@ async def read_cluster_all_endpoints(self, cluster):
407407 if global_attribute_ids .cluster_id_type (cluster .id ) == global_attribute_ids .ClusterIdType .kStandard :
408408 returned_attrs = sorted ([x .attribute_id for x in read_request [endpoint ][cluster ].keys ()
409409 if x != Clusters .Attribute .DataVersion ])
410- attr_list = sorted ([ x for x in read_request [endpoint ][cluster ][cluster .Attributes .AttributeList ]] )
410+ attr_list = sorted (list ( read_request [endpoint ][cluster ][cluster .Attributes .AttributeList ]) )
411411 asserts .assert_equal (
412412 returned_attrs ,
413413 attr_list ,
@@ -799,7 +799,7 @@ def verify_empty_wildcard(self, attr_path, read_request):
799799
800800 # Server list validation
801801 for endpoint in read_request .tlvAttributes :
802- returned_clusters = sorted (list ( read_request .tlvAttributes [endpoint ].keys () ))
802+ returned_clusters = sorted (read_request .tlvAttributes [endpoint ].keys ())
803803 server_list = sorted (read_request .tlvAttributes [endpoint ][Clusters .Descriptor .id ]
804804 [Clusters .Descriptor .Attributes .ServerList .attribute_id ])
805805 asserts .assert_equal (returned_clusters , server_list )
0 commit comments