Skip to content

Commit

Permalink
remove the duplicate changes from PR Ben1152000#64
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuajack committed Sep 11, 2022
1 parent a5bbe53 commit 200fa98
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions sootty/storage/wiregroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,12 @@ def find(self, name: str):
raise SoottyError(f"Wire '{name}' does not exist.")

def get_names(self):
"""Returns a dictionary of all wire names of this wiregroup or a list if this wiregroup is the innermost one."""
if self.groups:
names = dict()
if self.wires:
names[self.name] = list()
for wire in self.wires:
names[self.name].append(wire.name)
for group in self.groups:
names[group.name] = group.get_names()
else:
names = list()
for wire in self.wires:
names.append(wire.name)
"""Returns list of all wire names."""
names = set()
for wire in self.wires:
names.add(wire.name)
for group in self.groups:
names.update(group.get_names())
return names

def get_wires(self):
Expand Down

0 comments on commit 200fa98

Please sign in to comment.