typecheck: add --check-untyped-defs and fix some associated type errors

This commit is contained in:
InsanePrawn 2022-11-09 20:06:35 +01:00
parent c46cd0cd4f
commit a8e8ddc4b4
4 changed files with 15 additions and 7 deletions

View file

@ -4,7 +4,7 @@ import os
import subprocess
from copy import deepcopy
from shlex import quote as shell_quote
from typing import ClassVar, Protocol, Union, Optional, Mapping
from typing import ClassVar, Iterable, Protocol, Union, Optional, Mapping
from uuid import uuid4
from config.state import config
@ -179,7 +179,7 @@ class Chroot(AbstractChroot):
self.active_mounts.remove(relative_path)
return result
def umount_many(self, relative_paths: list[str]):
def umount_many(self, relative_paths: Iterable[str]):
# make sure paths start with '/'. Important: also copies the collection and casts to list, which will be sorted!
mounts = [make_abs_path(path) for path in relative_paths]
mounts.sort(reverse=True)