MCPcopy Index your code
hub / github.com/prometheus/client_python / _isUncanonicalNumber

Function _isUncanonicalNumber

prometheus_client/openmetrics/parser.py:29–33  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

27
28
29def _isUncanonicalNumber(s):
30 f = float(s)
31 if f not in _CANONICAL_NUMBERS:
32 return False # Only the canonical numbers are required to be canonical.
33 return s != floatToGoString(f)
34
35
36ESCAPE_SEQUENCES = {

Callers 1

Calls 1

floatToGoStringFunction · 0.85

Tested by

no test coverage detected