Skip to content

Commit 062a9b7

Browse files
committed
fix(os): satisfy component merger lint
1 parent 8500c94 commit 062a9b7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

os/mkosi/scripts/merge-component-trees.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010

1111

1212
def exists(path: Path) -> bool:
13+
"""Return whether a path exists, including a dangling symlink."""
1314
return path.exists() or path.is_symlink()
1415

1516

1617
def merge(component: str, source: Path, destination: Path) -> None:
18+
"""Merge one component tree into the destination without overwrites."""
1719
if not source.is_dir():
1820
raise SystemExit(f"{component}: missing install tree: {source}")
1921
for root, directories, files in os.walk(source):
@@ -46,6 +48,7 @@ def merge(component: str, source: Path, destination: Path) -> None:
4648

4749

4850
def main() -> None:
51+
"""Merge the component specifications passed on the command line."""
4952
destination = Path(sys.argv[1])
5053
destination.mkdir(parents=True, exist_ok=True)
5154
for specification in sys.argv[2:]:

0 commit comments

Comments
 (0)