From: Daan De Meyer Date: Wed, 20 Sep 2023 13:55:16 +0000 (+0200) Subject: Fix typing errors X-Git-Tag: v18~50^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0d62583ba844f8a67ae6b76a03de77744a2762c;p=thirdparty%2Fmkosi.git Fix typing errors --- diff --git a/mkosi/qemu.py b/mkosi/qemu.py index 5423df180..36e11036c 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -14,7 +14,6 @@ import tempfile import uuid from collections.abc import Iterator from pathlib import Path -from typing import Optional from mkosi.architecture import Architecture from mkosi.config import ( @@ -138,7 +137,7 @@ def find_ovmf_vars(config: MkosiConfig) -> Path: @contextlib.contextmanager -def start_swtpm() -> Iterator[Optional[Path]]: +def start_swtpm() -> Iterator[Path]: with tempfile.TemporaryDirectory() as state: sock = Path(state) / Path("sock") proc = spawn([ diff --git a/mkosi/run.py b/mkosi/run.py index 063712409..d17f54b60 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -178,11 +178,12 @@ def run( # output. stdout = sys.stderr - env = dict( - PATH=os.environ["PATH"], - TERM=os.getenv("TERM", "vt220"), - LANG="C.UTF-8", - ) | env + env = { + "PATH": os.environ["PATH"], + "TERM": os.getenv("TERM", "vt220"), + "LANG": "C.UTF-8", + **env, + } if "TMPDIR" in os.environ: env["TMPDIR"] = os.environ["TMPDIR"]