Skip to content

Commit

Permalink
fix code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Aug 23, 2021
1 parent 730030f commit 6ffdb47
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bmt/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,10 @@ def get_element(self, name: str) -> Optional[Element]:
"""
parsed_name = parse_name(name)
element = self.generator.obj_for(parsed_name)
if element is None:
if name in self.generator.aliases:
element = self.get_element(self.generator.aliases[name])
if element is None:
if "_" in name:
element = self.get_element(name.replace("_", " "))
if element is None and name in self.generator.aliases:
element = self.get_element(self.generator.aliases[name])
if element is None and "_" in name:
element = self.get_element(name.replace("_", " "))
return element

def get_slot_domain(
Expand Down

0 comments on commit 6ffdb47

Please sign in to comment.