Update signal_flow_graph.SFG.find_by_type_name. Now it actually checks the...
1 unresolved thread
Update signal_flow_graph.SFG.find_by_type_name. Now it actually checks the type name, and not the _graph_id. Safer (if user changed the graph_id), and no need for regex.
Merge request reports
Activity
assigned to @oscgu95
549 549 type_name : TypeName 550 550 The TypeName of the desired components. 551 551 """ 552 reg = f"{type_name}[0-9]+" 553 p = re.compile(reg) 554 552 components = [ 555 val for key, val in self._components_by_id.items() if p.match(key) 553 com for com in self._components_dfs_order if com.type_name() == type_name 556 554 ] 557 555 return components I now added a method
find_by_type
that takes the type. This still makes sense to provide though. I had to rely on the hacky way to get rid of multiple components and also opened an issue about it #332 as it is not clear that there should be multiple instances in the dfs-list.
Please register or sign in to reply