From 9264bba243cc266a3d69a36d4017e645974a17eb Mon Sep 17 00:00:00 2001 From: Emi Vasilek Date: Mon, 6 Nov 2023 23:33:03 +0100 Subject: [PATCH] bugfix: respect unit aliases --- recipes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")