constants.py: make TypeAliases explicit

This commit is contained in:
InsanePrawn 2022-02-17 19:36:08 +01:00
parent 795be0bf2a
commit 700c914855

View file

@ -1,3 +1,5 @@
from typing import TypeAlias
FASTBOOT = 'fastboot' FASTBOOT = 'fastboot'
FLASH_PARTS = { FLASH_PARTS = {
'ROOTFS': 'rootfs', 'ROOTFS': 'rootfs',
@ -72,13 +74,18 @@ REPOSITORIES = [
'phosh', 'phosh',
] ]
Arch = str KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
Arch: TypeAlias = str
ARCHES = [ ARCHES = [
'x86_64', 'x86_64',
'aarch64', 'aarch64',
] ]
BASE_DISTROS = { DistroArch: TypeAlias = Arch
TargetArch: TypeAlias = Arch
BASE_DISTROS: dict[DistroArch, dict[str, dict[str, str]]] = {
'x86_64': { 'x86_64': {
'repos': { 'repos': {
'core': 'http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch', 'core': 'http://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch',
@ -97,10 +104,6 @@ BASE_DISTROS = {
}, },
} }
KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo'
DistroArch = TargetArch = Arch
COMPILE_ARCHES: dict[Arch, str] = { COMPILE_ARCHES: dict[Arch, str] = {
'x86_64': 'amd64', 'x86_64': 'amd64',
'aarch64': 'arm64', 'aarch64': 'arm64',