mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 11:22:49 -05:00
13 lines
258 B
Python
13 lines
258 B
Python
from typing import Generic
|
|
from typing import TypeVar
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class MetricsHander(Generic[T]):
|
|
def __init__(self) -> None:
|
|
self.metrics: T | None = None
|
|
|
|
def record_metric(self, metrics: T) -> None:
|
|
self.metrics = metrics
|