From 4b7811a393fad0738b6c0494164027734ab4daa7 Mon Sep 17 00:00:00 2001 From: Chris Marchbanks Date: Wed, 26 Jan 2022 10:14:25 -0700 Subject: [PATCH] Allow labelvalues and labelkwargs to be Any type We will cast all labelvalues to be strings so we should not force a user to cast to a string before passing the label. Signed-off-by: Chris Marchbanks --- prometheus_client/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prometheus_client/metrics.py b/prometheus_client/metrics.py index 12f793c2..9333282b 100644 --- a/prometheus_client/metrics.py +++ b/prometheus_client/metrics.py @@ -133,7 +133,7 @@ def __init__(self: T, if registry: registry.register(self) - def labels(self: T, *labelvalues: str, **labelkwargs: str) -> T: + def labels(self: T, *labelvalues: Any, **labelkwargs: Any) -> T: """Return the child for the given labelset. All metrics can have labels, allowing grouping of related time series.