8000 Allow labelvalues and labelkwargs to be Any type · reinaldoca/client_python@4b7811a · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b7811a

Browse files
committed
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 <csmarchbanks@gmail.com>
1 parent 69e915c commit 4b7811a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prometheus_client/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def __init__(self: T,
133133
if registry:
134134
registry.register(self)
135135

136-
def labels(self: T, *labelvalues: str, **labelkwargs: str) -> T:
136+
def labels(self: T, *labelvalues: Any, **labelkwargs: Any) -> T:
137137
"""Return the child for the given labelset.
138138
139139
All metrics can have labels, allowing grouping of related time series.

0 commit comments

Comments
 (0)
0