@@ -36,26 +36,23 @@ def get_descriptor(self) -> str:
3636 if not status .ok ():
3737 raise Exception ("Failed to read ep0 device type list: %s" , status )
3838
39- out ["device_types" ] = list (
40- map (lambda dt : dt .device_type , device_types ))
39+ out ["device_types" ] = [dt .device_type for dt in device_types ]
4140 (status , parts_list ) = self .rpcs .chip .rpc .Descriptor .PartsList (endpoint = 0 )
4241 if not status .ok ():
4342 raise Exception ("Failed to read ep0 parts list: %s" , status )
4443
45- out ["parts_list" ] = list ( map ( lambda ep : ep .endpoint , parts_list ))
44+ out ["parts_list" ] = [ ep .endpoint for ep in parts_list ]
4645 out ["endpoints" ] = {}
4746 for ep in out ["parts_list" ]:
4847 out ["endpoints" ][str (ep )] = {}
4948 (status , clusters ) = self .rpcs .chip .rpc .Descriptor .ClientList (endpoint = ep )
5049 if not status .ok ():
5150 raise Exception ("Failed to read ep0 parts list: %s" , status )
52- out ["endpoints" ][str (ep )]["client_list" ] = list (
53- map (lambda c : c .cluster_id , clusters ))
51+ out ["endpoints" ][str (ep )]["client_list" ] = [c .cluster_id for c in clusters ]
5452 (status , clusters ) = self .rpcs .chip .rpc .Descriptor .ServerList (endpoint = ep )
5553 if not status .ok ():
5654 raise Exception ("Failed to read ep0 parts list: %s" , status )
57- out ["endpoints" ][str (ep )]["server_list" ] = list (
58- map (lambda c : c .cluster_id , clusters ))
55+ out ["endpoints" ][str (ep )]["server_list" ] = [c .cluster_id for c in clusters ]
5956
6057 return out
6158
0 commit comments