diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-11 10:26:55 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-11 13:12:11 +0200 |
commit | 0c8d70daae4c4dfc989edad465db94ffc665416d (patch) | |
tree | 86f1b23e863b2dae1efd00686d46890b4b72ccb2 /src/hydrilla/server | |
parent | 9074d98f711b6ccc099df8bccb1ed28390bcf0da (diff) | |
download | haketilo-hydrilla-0c8d70daae4c4dfc989edad465db94ffc665416d.tar.gz haketilo-hydrilla-0c8d70daae4c4dfc989edad465db94ffc665416d.zip |
[builder][server] restore compatibility with python 3.7
Diffstat (limited to 'src/hydrilla/server')
-rw-r--r-- | src/hydrilla/server/config.py | 6 | ||||
-rw-r--r-- | src/hydrilla/server/malcontent.py | 2 | ||||
-rw-r--r-- | src/hydrilla/server/serve.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/hydrilla/server/config.py b/src/hydrilla/server/config.py index 51eb875..c0b1c5c 100644 --- a/src/hydrilla/server/config.py +++ b/src/hydrilla/server/config.py @@ -77,9 +77,9 @@ config_schema = { here = Path(__file__).resolve().parent -def load(config_paths: list[Path]=[here / 'config.json'], - can_fail: list[bool]=[]) -> dict: - config: dict[str, t.Any] = {} +def load(config_paths: t.List[Path]=[here / 'config.json'], + can_fail: t.List[bool]=[]) -> t.Dict[str, t.Any]: + config: t.Dict[str, t.Any] = {} bools_missing = max(0, len(config_paths) - len(can_fail)) config_paths = [*config_paths] diff --git a/src/hydrilla/server/malcontent.py b/src/hydrilla/server/malcontent.py index 02acc81..8e4eaa7 100644 --- a/src/hydrilla/server/malcontent.py +++ b/src/hydrilla/server/malcontent.py @@ -236,7 +236,7 @@ class Malcontent: If multiple versions of a mapping are applicable, only the most recent is included in the result. """ - collected: dict[str, item_infos.MappingInfo] = {} + collected: t.Dict[str, item_infos.MappingInfo] = {} for result_set in self.mapping_tree.search(url): for wrapped_mapping_info in result_set: info = wrapped_mapping_info.item diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py index 4e2eb00..7c9789a 100644 --- a/src/hydrilla/server/serve.py +++ b/src/hydrilla/server/serve.py @@ -155,8 +155,8 @@ def get_newest_mapping(identifier_dot_json: str) -> werkzeug.Response: def get_newest_resource(identifier_dot_json: str) -> werkzeug.Response: return get_resource_or_mapping('resource', identifier_dot_json) -def make_ref(info: item_infos.AnyInfo) -> dict[str, t.Any]: - ref: dict[str, t.Any] = { +def make_ref(info: item_infos.AnyInfo) -> t.Dict[str, t.Any]: + ref: t.Dict[str, t.Any] = { 'version': info.version, 'identifier': info.identifier, 'long_name': info.long_name |