8000 Declare `registry` on `MetricWrapperBase` as `Optional` (#754) · chnacib/client_python@b44b63e · GitHub
[go: up one dir, main page]

Skip to content

Commit b44b63e

Browse files
authored
Declare registry on MetricWrapperBase as Optional (prometheus#754)
* Declare `registry` on `MetricWrapperBase` as `Optional` * Declare `registry` on `Enum` as `Optional` Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
1 parent b3271a3 commit b44b63e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prometheus_client/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(self: T,
107107
namespace: str = '',
108108
subsystem: str = '',
109109
unit: str = '',
110-
registry: CollectorRegistry = REGISTRY,
110+
registry: Optional[CollectorRegistry] = REGISTRY,
111111
_labelvalues: Optional[Sequence[str]] = None,
112112
) -> None:
113113
self._name = _build_full_name(self._type, name, namespace, subsystem, unit)
@@ -677,7 +677,7 @@ def __init__(self,
677677
namespace: str = '',
678678
subsystem: str = '',
679679
unit: str = '',
680-
registry: CollectorRegistry = REGISTRY,
680+
registry: Optional[CollectorRegistry] = REGISTRY,
681681
_labelvalues: Optional[Sequence[str]] = None,
682682
states: Optional[Sequence[str]] = None,
683683
):

0 commit comments

Comments
 (0)
0