diff --git a/packages/ref-core/src/ref_core/providers.py b/packages/ref-core/src/ref_core/providers.py index a7cd1f5..c9a2ab3 100644 --- a/packages/ref-core/src/ref_core/providers.py +++ b/packages/ref-core/src/ref_core/providers.py @@ -4,8 +4,6 @@ This defines how metrics packages interoperate with the REF framework. """ -from collections.abc import Iterator - from ref_core.exceptions import InvalidMetricException from ref_core.metrics import Metric @@ -23,7 +21,7 @@ def __init__(self, name: str, version: str) -> None: self._metrics: dict[str, Metric] = {} - def metrics(self) -> Iterator[Metric]: + def metrics(self) -> list[Metric]: """ Iterate over the available metrics for the provider. @@ -32,7 +30,7 @@ def metrics(self) -> Iterator[Metric]: : Iterator over the currently registered metrics. """ - return iter(self._metrics.values()) + return list(self._metrics.values()) def __len__(self) -> int: return len(self._metrics)