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

Function _is_character_escaped

prometheus_client/parser.py:44–49  ·  view source on GitHub ↗
(s: str, charpos: int)

Source from the content-addressed store, hash-verified

42
43
44def _is_character_escaped(s: str, charpos: int) -> bool:
45 num_bslashes = 0
46 while (charpos > num_bslashes
47 and s[charpos - 1 - num_bslashes] == '\\'):
48 num_bslashes += 1
49 return num_bslashes % 2 == 1
50
51
52def parse_labels(labels_string: str, openmetrics: bool = False) -> Dict[str, str]:

Callers 3

parse_labelsFunction · 0.70
_next_unquoted_charFunction · 0.70
_last_unquoted_charFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected