Skip to content

Commit

Permalink
Allow labelvalues and labelkwargs to be Any type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
csmarchbanks committed Jan 26, 2022
1 parent 69e915c commit 4b7811a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prometheus_client/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4b7811a

Please sign in to comment.