10000 Mark collector parameter as optional in ProcessCollector · JustinJohnsonK/client_python@cfc11d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfc11d8

Browse files
committed
Mark collector parameter as optional in ProcessCollector
Signed-off-by: Alberto Donato <alberto.donato@gmail.com>
1 parent 249490e commit cfc11d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prometheus_client/process_collector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from typing import Callable, Iterable, Union
2+
from typing import Callable, Iterable, Optional, Union
33

44
from .metrics_core import CounterMetricFamily, GaugeMetricFamily, Metric
55
from .registry import Collector, CollectorRegistry, REGISTRY
@@ -20,7 +20,7 @@ def __init__(self,
2020
namespace: str = '',
2121
pid: Callable[[], Union[int, str]] = lambda: 'self',
2222
proc: str = '/proc',
23-
registry: CollectorRegistry = REGISTRY):
23+
registry: Optional[CollectorRegistry] = REGISTRY):
2424
self._namespace = namespace
2525
self._pid = pid
2626
self._proc = proc

0 commit comments

Comments
 (0)
0