8000 Remove duplicate code (#320) · ethervoid/client_python@9e65e88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e65e88

Browse files
hex2decbrian-brazil
authored andcommitted
Remove duplicate code (prometheus#320)
Signed-off-by: William Huang <ai.william@outlook.com>
1 parent 9021384 commit 9e65e88

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

prometheus_client/core.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ def __init__(self, name, documentation, typ, unit=''):
219219
if typ not in _METRIC_TYPES:
220220
raise ValueError('Invalid metric type: ' + typ)
221221
self.type = typ
222-
if unit:
223-
if not name.endswith('_' + unit):
224-
raise ValueError('Metric name does not end with unit: ' + name)
225-
self.unit = unit
226222
self.samples = []
227223

228224
def add_sample(self, name, labels, value, timestamp=None, exemplar=None):

0 commit comments

Comments
 (0)
0