Skip to content

Commit

Permalink
chore: Revert to returning a list of metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared committed Nov 23, 2024
1 parent 1565f81 commit 4dfdb17
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/ref-core/src/ref_core/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand All @@ -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)
Expand Down

0 comments on commit 4dfdb17

Please sign in to comment.