Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Feb 18, 2025
1 parent f8882a4 commit 2137943
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions buildingmotif/dataclasses/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ def _resolve_dependency(
elif isinstance(dep, dict):
binding_args = dep.get("args", {})
if "library" in dep:
dependee = Library.load(name=dep["library"]).get_template_by_name(dep["template"])
dependee = Library.load(name=dep["library"]).get_template_by_name(
dep["template"]
)
elif dep["template"] in template_id_lookup:
dependee = Template.load(template_id_lookup[dep["template"]])
elif skip_uri(dep["template"]):
Expand All @@ -442,11 +444,15 @@ def _resolve_dependency(
dependee = library.get_template_by_name(dep["template"])
break
except Exception as e:
logging.debug(f"Could not find dependee {dep['template']} in library {imp}: {e}")
logging.debug(
f"Could not find dependee {dep['template']} in library {imp}: {e}"
)
if dependee is not None:
template.add_dependency(dependee, binding_args)
else:
logging.warning(f"Warning: could not find dependee {dep['template']} in libraries {self.graph_imports}")
logging.warning(
f"Warning: could not find dependee {dep} in libraries {self.graph_imports}"
)

def _resolve_template_dependencies(
self,
Expand Down

0 comments on commit 2137943

Please sign in to comment.