added comments to disable repr

This commit is contained in:
harish-berri 2026-04-17 17:04:31 +00:00
parent 1eb6be9d44
commit 62a189f57c

View file

@ -792,6 +792,10 @@ class UserAPIKeyLabelValues:
)
def __repr__(self) -> str:
# Perf: this object is constructed on every Prometheus logging path; verbose
# dataclass/Pydantic-style repr is expensive and often pulled in accidentally
# via f-strings / debug logging. Return empty so accidental stringification
# stays cheap. (Dataclass default `str()` delegates to `__repr__`.)
return ""
def model_dump(self) -> Dict[str, Any]: