Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Oct 26, 2023
1 parent 2718393 commit 2ce05b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Lib/gftools/builder/recipeproviders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@

filecache = {}


def get_file(path):
if path not in filecache:
filecache[path] = File(path)
return filecache[path]


@dataclass
class RecipeProviderBase:
config: dict
builder: "gftools.builder.GFBuilder"

def write_recipe(self):
raise NotImplementedError

@property
def sources(self) -> List[File]:
return [get_file(p) for p in self.config["sources"]]
Expand All @@ -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:
Expand Down

0 comments on commit 2ce05b2

Please sign in to comment.