From 700c914855ef2c4be8c67012a212f7930b34579b Mon Sep 17 00:00:00 2001 From: InsanePrawn Date: Thu, 17 Feb 2022 19:36:08 +0100 Subject: [PATCH] constants.py: make TypeAliases explicit --- constants.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/constants.py b/constants.py index 0bb72fe..dea7ebb 100644 --- a/constants.py +++ b/constants.py @@ -1,3 +1,5 @@ +from typing import TypeAlias + FASTBOOT = 'fastboot' FLASH_PARTS = { 'ROOTFS': 'rootfs', @@ -72,13 +74,18 @@ REPOSITORIES = [ 'phosh', ] -Arch = str +KUPFER_HTTPS = 'https://gitlab.com/kupfer/packages/prebuilts/-/raw/main/$repo' + +Arch: TypeAlias = str ARCHES = [ 'x86_64', 'aarch64', ] -BASE_DISTROS = { +DistroArch: TypeAlias = Arch +TargetArch: TypeAlias = Arch + +BASE_DISTROS: dict[DistroArch, dict[str, dict[str, str]]] = { 'x86_64': { 'repos': { '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] = { 'x86_64': 'amd64', 'aarch64': 'arm64',