diff --git a/Lib/gftools/builder/recipeproviders/__init__.py b/Lib/gftools/builder/recipeproviders/__init__.py index e8bf3341e..3777891f5 100644 --- a/Lib/gftools/builder/recipeproviders/__init__.py +++ b/Lib/gftools/builder/recipeproviders/__init__.py @@ -6,11 +6,13 @@ filecache = {} + def get_file(path): if path not in filecache: filecache[path] = File(path) return filecache[path] + @dataclass class RecipeProviderBase: config: dict @@ -18,7 +20,7 @@ class RecipeProviderBase: def write_recipe(self): raise NotImplementedError - + @property def sources(self) -> List[File]: return [get_file(p) for p in self.config["sources"]] @@ -27,7 +29,7 @@ def sources(self) -> List[File]: def get_provider(provider): # First try gftools.builder.recipeproviders.X try: - mod = importlib.import_module("gftools.builder.recipeproviders."+provider) + mod = importlib.import_module("gftools.builder.recipeproviders." + provider) except ModuleNotFoundError: # Then try X try: