diff options
author | lovetox <philipp@hoerist.com> | 2022-05-06 22:29:02 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2022-05-06 22:29:02 +0300 |
commit | 227f53f69d30bc1fc0dcb1ad83bbc82d7d3ebe92 (patch) | |
tree | 4b787e8107b32081aded024dec0bef79c0d91c01 /scripts/build_repository.py | |
parent | a02aaf3bc3aab44aa58f6764970a069b0b43d36f (diff) |
Script: Make build_repository python3.7 compatible
Diffstat (limited to 'scripts/build_repository.py')
-rw-r--r-- | scripts/build_repository.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/build_repository.py b/scripts/build_repository.py index 3c14f94..08460bc 100644 --- a/scripts/build_repository.py +++ b/scripts/build_repository.py @@ -1,7 +1,11 @@ +# Keep this file python 3.7 compatible because it is executed on the server + from typing import Any from typing import Dict from typing import Iterator +from typing import Set +from typing import Dict import sys import json @@ -16,7 +20,7 @@ logging.basicConfig(format=FORMAT, level=logging.DEBUG) log = logging.getLogger() -REQUIRED_KEYS: set[str] = { +REQUIRED_KEYS: Set[str] = { 'authors', 'description', 'homepage', @@ -28,7 +32,7 @@ REQUIRED_KEYS: set[str] = { 'version' } -PACKAGE_INDEX: dict[str, Any] = { +PACKAGE_INDEX: Dict[str, Any] = { 'metadata': { 'repository_name': 'master', 'image_url': 'images.zip', @@ -37,7 +41,7 @@ PACKAGE_INDEX: dict[str, Any] = { } -def is_manifest_valid(manifest: dict[str, Any]) -> bool: +def is_manifest_valid(manifest: Dict[str, Any]) -> bool: manifest_keys = set(manifest.keys()) return REQUIRED_KEYS.issubset(manifest_keys) |