From d5da1154e9db39f4d40d5d1265206daa4f923eb2 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 8 Feb 2024 14:26:53 +0100 Subject: [PATCH] Issue #112 Improve return type hint of `get_backend_config` --- src/openeo_aggregator/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/openeo_aggregator/config.py b/src/openeo_aggregator/config.py index 8c68bc1..8141343 100644 --- a/src/openeo_aggregator/config.py +++ b/src/openeo_aggregator/config.py @@ -139,7 +139,10 @@ class AggregatorBackendConfig(OpenEoBackendConfig): streaming_chunk_size: int = STREAM_CHUNK_SIZE_DEFAULT - +# Internal singleton _config_getter = ConfigGetter(expected_class=AggregatorBackendConfig) -get_backend_config: Callable[..., AggregatorBackendConfig] = _config_getter.get + +def get_backend_config() -> AggregatorBackendConfig: + """Public config getter""" + return _config_getter.get()