Skip to content

Commit

Permalink
Format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Dec 16, 2023
1 parent ee31a08 commit 2480890
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions toltec/recipe_parsers/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def parse(path: str) -> RecipeBundle:
definition = recipe.read()
variables, functions = bash.get_declarations(definition)

for arch, variables, functions in _instantiate_arch(path, variables, functions):
for arch, variables, functions in _instantiate_arch(
path, variables, functions
):
result[arch] = _parse_recipe(path, variables, functions)

return result
Expand Down Expand Up @@ -172,15 +174,21 @@ def _parse_recipe( # pylint: disable=too-many-locals, disable=too-many-statemen

makedepends_raw = _pop_field_indexed(path, variables, "makedepends", [])
raw_vars["makedepends"] = makedepends_raw
attrs["makedepends"] = {Dependency.parse(dep or "") for dep in makedepends_raw}
attrs["makedepends"] = {
Dependency.parse(dep or "") for dep in makedepends_raw
}

attrs["maintainer"] = raw_vars["maintainer"] = _pop_field_string(
path, variables, "maintainer"
)

attrs["image"] = raw_vars["image"] = _pop_field_string(path, variables, "image", "")
attrs["image"] = raw_vars["image"] = _pop_field_string(
path, variables, "image", ""
)

attrs["arch"] = raw_vars["arch"] = _pop_field_string(path, variables, "arch")
attrs["arch"] = raw_vars["arch"] = _pop_field_string(
path, variables, "arch"
)

if attrs["image"] and "build" not in functions:
raise RecipeError(
Expand Down Expand Up @@ -297,7 +305,9 @@ def _parse_package( # pylint: disable=too-many-locals, disable=too-many-stateme
parent.path, variables, "pkgdesc"
)

attrs["url"] = raw_vars["url"] = _pop_field_string(parent.path, variables, "url")
attrs["url"] = raw_vars["url"] = _pop_field_string(
parent.path, variables, "url"
)

attrs["section"] = raw_vars["section"] = _pop_field_string(
parent.path, variables, "section"
Expand Down

0 comments on commit 2480890

Please sign in to comment.