]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Annotate two more variables that need it
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 5 Sep 2024 12:30:03 +0000 (14:30 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 5 Sep 2024 13:09:28 +0000 (15:09 +0200)
mkosi/config.py
mkosi/partition.py

index b2b2f1ea60b3cf3b36d3e980e7742e409e685c56..71adc9e6113bf4ca96f76ded8434f352cb43ab5e 100644 (file)
@@ -3358,7 +3358,7 @@ def create_argument_parser(chdir: bool = True) -> argparse.ArgumentParser:
         help=argparse.SUPPRESS,
     )
 
-    last_section = None
+    last_section: Optional[str] = None
 
     for s in SETTINGS:
         if s.section != last_section:
index 4faa12c1006bfc0ff74e0671cdec79f851f9fa0a..41d243f504c156138dfc55d539ff83f9ef0841d2 100644 (file)
@@ -43,7 +43,8 @@ def find_partitions(image: Path, *, sandbox: SandboxProtocol = nosandbox) -> lis
 
 
 def finalize_roothash(partitions: Sequence[Partition]) -> Optional[str]:
-    roothash = usrhash = None
+    roothash: Optional[str] = None
+    usrhash: Optional[str] = None
 
     for p in partitions:
         if (h := p.roothash) is None: