Skip to content

Commit 91e3da0

Browse files
committed
Formatting
1 parent c6ad40c commit 91e3da0

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

toltec/builder.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def post_build(self, recipe: Recipe, src_dir: str) -> None:
112112
"""
113113

114114
@util.hook
115-
def post_package(self, package: Package, src_dir: str, pkg_dir: str) -> None:
115+
def post_package(
116+
self, package: Package, src_dir: str, pkg_dir: str
117+
) -> None:
116118
"""
117119
Triggered after part of the artifacts from a build have been copied
118120
in place to the packaging directory.
@@ -193,7 +195,9 @@ def _make_arch(
193195
base_pkg_dir = os.path.join(build_dir, "pkg")
194196
os.makedirs(base_pkg_dir, exist_ok=True)
195197

196-
for package in packages if packages is not None else recipe.packages.values():
198+
for package in (
199+
packages if packages is not None else recipe.packages.values()
200+
):
197201
pkg_dir = os.path.join(base_pkg_dir, package.name)
198202
os.makedirs(pkg_dir, exist_ok=True)
199203

@@ -223,7 +227,9 @@ def _fetch_sources(
223227

224228
if self.URL_REGEX.match(source.url) is None:
225229
# Get source file from the recipe’s directory
226-
_ = shutil.copy2(os.path.join(recipe.path, source.url), local_path)
230+
_ = shutil.copy2(
231+
os.path.join(recipe.path, source.url), local_path
232+
)
227233
else:
228234
# Fetch source file from the network
229235
req = requests.get(source.url, timeout=(3.05, 300))
@@ -449,7 +455,9 @@ def _package(self, package: Package, src_dir: str, pkg_dir: str) -> None:
449455
for filename in util.list_tree(pkg_dir):
450456
logger.debug(
451457
" - %s",
452-
os.path.normpath(os.path.join("/", os.path.relpath(filename, pkg_dir))),
458+
os.path.normpath(
459+
os.path.join("/", os.path.relpath(filename, pkg_dir))
460+
),
453461
)
454462

455463
@staticmethod
@@ -494,7 +502,9 @@ def _archive(package: Package, pkg_dir: str, ar_path: str) -> None:
494502
)
495503

496504
for step in ("pre", "post"):
497-
if getattr(package, step + "upgrade") or getattr(package, step + "remove"):
505+
if getattr(package, step + "upgrade") or getattr(
506+
package, step + "remove"
507+
):
498508
script = script_header
499509

500510
for action in ("upgrade", "remove"):

0 commit comments

Comments
 (0)