Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cfc11d8

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

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎prometheus_client/process_collector.py

Copy file name to clipboardExpand all lines: prometheus_client/process_collector.py
+2-2Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.