Skip to content

Commit bc497f1

Browse files
DaanDeMeyerbehrmann
authored andcommitted
Fix typing due to recent changes in typeshed
python/typeshed#13767 narrows the typing for shutil.copy2() so let's address that by fixing our typing.
1 parent e6a603a commit bc497f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mkosi/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,7 @@ def save_esp_components(
33043304
if not stub.exists():
33053305
die(f"sd-stub not found at /{stub.relative_to(context.root)} in the image")
33063306

3307-
return shutil.copy2(stub, context.workspace), None, None, []
3307+
return Path(shutil.copy2(stub, context.workspace)), None, None, []
33083308

33093309
if context.config.output_format not in (OutputFormat.uki, OutputFormat.esp):
33103310
return None, None, None, []
@@ -3317,7 +3317,7 @@ def save_esp_components(
33173317

33183318
return None, None, None, []
33193319

3320-
kimg = shutil.copy2(context.root / kimg, context.workspace)
3320+
kimg = Path(shutil.copy2(context.root / kimg, context.workspace))
33213321

33223322
if not context.config.architecture.to_efi():
33233323
die(f"Architecture {context.config.architecture} does not support UEFI")
@@ -3326,7 +3326,7 @@ def save_esp_components(
33263326
if not stub.exists():
33273327
die(f"sd-stub not found at /{stub.relative_to(context.root)} in the image")
33283328

3329-
stub = shutil.copy2(stub, context.workspace)
3329+
stub = Path(shutil.copy2(stub, context.workspace))
33303330
microcode = build_microcode_initrd(context)
33313331

33323332
return stub, kver, kimg, microcode

0 commit comments

Comments
 (0)