Type annotate all the things!

This commit is contained in:
InsanePrawn 2022-02-18 06:32:04 +01:00
parent a7da033845
commit 7a324555da
14 changed files with 213 additions and 134 deletions

View file

@ -1,4 +1,5 @@
import os
from typing import Union, Optional, TypedDict
from config import config
from constants import Arch
@ -7,9 +8,16 @@ BIND_BUILD_DIRS = 'BINDBUILDDIRS'
BASE_CHROOT_PREFIX = 'base_'
BUILD_CHROOT_PREFIX = 'build_'
class MountEntry(TypedDict):
src: str
type: Optional[str]
options: list[str]
# inspired by arch-chroot
# order of these matters!
BASIC_MOUNTS = {
BASIC_MOUNTS: dict[str, MountEntry] = {
'/proc': {
'src': 'proc',
'type': 'proc',