Skip to content

Commit 0144e72

Browse files
committed
Silence type checker warning
1 parent e4b7fc3 commit 0144e72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pycheribuild/projects/disk_image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
)
5555
from .simple_project import SimpleProject
5656
from ..config.compilation_targets import CompilationTargets
57-
from ..mtree import MtreeFile
57+
from ..mtree import MtreeFile, MtreePath
5858
from ..utils import AnsiColour, classproperty, coloured, include_local_file
5959

6060
# Notes:
@@ -242,7 +242,7 @@ def __init__(self, *args, **kwargs) -> None:
242242
self.hostname = os.path.expandvars(self.hostname) # Expand env vars in hostname to allow $CHERI_BITS
243243
# MIPS needs big-endian disk images
244244
self.big_endian = self.compiling_for_mips(include_purecap=True)
245-
self.stripped_contents: "dict[Union[str,Path], Path]" = {}
245+
self.stripped_contents: "dict[Union[str,PurePath], PurePath]" = {}
246246

247247
@cached_property
248248
def source_project(self) -> BuildFreeBSD:
@@ -342,7 +342,7 @@ def add_from_mtree(
342342
if strip_binaries:
343343
# Try to shrink the size by stripping all elf binaries
344344
entry = self.mtree.get(mtree_path)
345-
contents = entry.attributes.get("contents", entry.path)
345+
contents = MtreePath(entry.attributes.get("contents", entry.path))
346346
if contents not in self.stripped_contents:
347347
stripped_path = self.tmpdir / entry.path
348348
file = self.rootfs_dir / contents

0 commit comments

Comments
 (0)