diff --git a/recipes.py b/recipes.py index 7daf5d0..e2af7a0 100644 --- a/recipes.py +++ b/recipes.py @@ -99,7 +99,7 @@ class Units: def get(self, name: str) -> Optional[Unit]: for unit in self.units: - if unit["name"] == name: + if unit["name"] == name or "aliases" in unit and name in unit["aliases"]: return unit raise RuntimeError(f"unit {name} not found")