8000 Fix some typos (#489) · lifehacking/client_python@3ab0374 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ab0374

Browse files
asherfbrian-brazil
authored andcommitted
Fix some typos (prometheus#489)
Signed-off-by: Asher Foa <asher@asherfoa.com>
1 parent 1521d81 commit 3ab0374

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

prometheus_client/exposition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def sample_line(line):
9999
mtype = 'gauge'
100100
elif mtype == 'gaugehistogram':
101101
# A gauge histogram is really a gauge,
102-
# but this captures the strucutre better.
102+
# but this captures the structure better.
103103
mtype = 'histogram'
104104
elif mtype == 'unknown':
105105
mtype = 'untyped'

prometheus_client/metrics_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __repr__(self):
6060

6161

6262
class UnknownMetricFamily(Metric):
63-
"""A single unknwon metric and its samples.
63+
"""A single unknown metric and its samples.
6464
For use by custom collectors.
6565
"""
6666

prometheus_client/openmetrics/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _parse_labels(text):
214214
break
215215
i += 1
216216

217-
# The label value is inbetween the first and last quote
217+
# The label value is between the first and last quote
218218
quote_end = i + 1
219219
label_value = sub_labels[1:quote_end]
220220
# Replace escaping if needed
@@ -245,10 +245,10 @@ def _parse_labels(text):
245245

246246

247247
def _parse_sample(text):
248-
seperator = " # "
248+
separator = " # "
249249
# Detect the labels in the text
250250
label_start = text.find("{")
251-
if label_start == -1 or seperator in text[:label_start]:
251+
if label_start == -1 or separator in text[:label_start]:
252252
# We don't have labels, but there could be an exemplar.
253253
name_end = text.index(" ")
254254
name = text[:name_end]
@@ -258,7 +258,7 @@ def _parse_sample(text):
258258
return Sample(name, {}, value, timestamp, exemplar)
259259
# The name is before the labels
260260
name = text[:label_start]
261-
if seperator not in text:
261+
if separator not in text:
262262
# Line doesn't contain an exemplar
263263
# We can use `rindex` to find `label_end`
264264
label_end = text.rindex("}")

prometheus_client/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def _parse_labels(labels_string):
8383
break
8484
i += 1
8585

86-
# The label value is inbetween the first and last quote
86+
# The label value is between the first and last quote
8787
quote_end = i + 1
8888
label_value = sub_labels[quote_start:quote_end]
8989
# Replace escaping if needed

0 commit comments

Comments
 (0)
0