8000 Clarify the parser input is unicode. · pythonAI/client_python@052116d · GitHub
[go: up one dir, main page]

Skip to content

Commit 052116d

Browse files
committed
Clarify the parser input is unicode.
1 parent cc852a9 commit 052116d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ system.
480480

481481
```python
482482
from prometheus_client.parser import text_string_to_metric_families
483-
for family in text_string_to_metric_families("my_gauge 1.0\n"):
483+
for family in text_string_to_metric_families(u"my_gauge 1.0\n"):
484484
for sample in family.samples:
485485
print("Name: {0} Labels: {1} Value: {2}".format(*sample))
486486
```

prometheus_client/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def text_string_to_metric_families(text):
15-
"""Parse Prometheus text format from a string.
15+
"""Parse Prometheus text format from a unicode string.
1616
1717
See text_fd_to_metric_families.
1818
"""

0 commit comments

Comments
 (0)
0