Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark collector parameter as optional in ProcessCollector and PlatformCollector #970

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions prometheus_client/process_collector.py
@@ -1,5 +1,5 @@
import os
from typing import Callable, Iterable, Union
from typing import Callable, Iterable, Optional, Union

from .metrics_core import CounterMetricFamily, GaugeMetricFamily, Metric
from .registry import Collector, CollectorRegistry, REGISTRY
Expand All @@ -20,7 +20,7 @@ def __init__(self,
namespace: str = '',
pid: Callable[[], Union[int, str]] = lambda: 'self',
proc: str = '/proc',
registry: CollectorRegistry = REGISTRY):
registry: Optional[CollectorRegistry] = REGISTRY):
self._namespace = namespace
self._pid = pid
self._proc = proc
Expand Down