Skip to content

Commit

Permalink
comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aappleby committed Mar 12, 2024
1 parent a99a720 commit 7c6a41f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hancho.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ async def expand(self):
self.desc = await expand_async(self, self.desc)

# Check for missing fields

if not self.command: # pylint: disable=access-member-before-definition
raise ValueError(f"Command missing for input {self.files_in}!")
if self.files_in is None:
Expand All @@ -637,12 +638,14 @@ async def expand(self):
self.abs_files_out = [abspath(self.out_dir / f) for f in self.files_out]
self.abs_deps = [abspath(self.deps_dir / f) for f in self.deps]

# Strip root_dir off the absolute paths to produce root-relative paths
# Strip task_dir off the absolute paths to produce task_dir-relative paths

self.files_in = [relpath(f, self.task_dir) for f in self.abs_files_in]
self.files_out = [relpath(f, self.task_dir) for f in self.abs_files_out]
self.deps = [relpath(f, self.task_dir) for f in self.abs_deps]

# Flatten+expand our command list
# Now that files_in/files_out/deps are flat, we can expand our command list

self.command = await flatten_async(self, self.command)

########################################
Expand Down

0 comments on commit 7c6a41f

Please sign in to comment.