forked from Mirror/pmbootstrap
pmb: Add more type hints (MR 2513)
And fix some consequential type errors. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
c8194302fc
commit
0925b3e425
12 changed files with 69 additions and 19 deletions
|
@ -12,6 +12,7 @@ import re
|
|||
import signal
|
||||
import shlex
|
||||
import shutil
|
||||
from types import FrameType
|
||||
|
||||
import pmb.build
|
||||
import pmb.chroot
|
||||
|
@ -327,7 +328,7 @@ def resize_image(img_size_new: str, img_path: Path) -> None:
|
|||
raise RuntimeError(f"IMAGE_SIZE must be {img_size_str} or greater")
|
||||
|
||||
|
||||
def sigterm_handler(number, frame):
|
||||
def sigterm_handler(number: int, stack_frame: FrameType | None) -> None:
|
||||
raise RuntimeError(
|
||||
"pmbootstrap was terminated by another process, and killed the QEMU VM it was running."
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue