@@ -103,12 +103,12 @@ def __repr__(self):
103
103
def __init__ (self : T ,
104
104
name : str ,
105
105
documentation : str ,
106
- labelnames : Sequence [str ]= (),
107
- namespace : str = '' ,
108
- subsystem : str = '' ,
109
- unit : str = '' ,
110
- registry : CollectorRegistry = REGISTRY ,
111
- _labelvalues : Optional [Sequence [str ]]= None ,
106
+ labelnames : Sequence [str ] = (),
107
+ namespace : str = '' ,
108
+ subsystem : str = '' ,
109
+ unit : str = '' ,
110
+ registry : CollectorRegistry = REGISTRY ,
111
+ _labelvalues : Optional [Sequence [str ]] = None ,
112
112
) -> None :
113
113
self ._name = _build_full_name (self ._type , name , namespace , subsystem , unit )
114
114
self ._labelnames = _validate_labelnames (self , labelnames )
@@ -269,7 +269,7 @@ def _metric_init(self) -> None:
269
269
self ._labelvalues )
270
270
self ._created = time .time ()
271
271
272
- def inc (self , amount : float = 1 , exemplar : Optional [Dict [str , str ]]= None ) -> None :
272
+ def inc (self , amount : float = 1 , exemplar : Optional [Dict [str , str ]] = None ) -> None :
273
273
"""Increment counter by the given amount."""
274
274
self ._raise_if_not_observable ()
275
275
if amount < 0 :
@@ -279,7 +279,7 @@ def inc(self, amount: float=1, exemplar: Optional[Dict[str, str]]=None) -> None:
279
279
_validate_exemplar (exemplar )
280
280
self ._value .set_exemplar (Exemplar (exemplar , amount , time .time ()))
281
281
282
- def count_exceptions (self , exception : Type [BaseException ]= Exception ) -> ExceptionCounter :
282
+ def count_exceptions (self , exception : Type [BaseException ] = Exception ) -> ExceptionCounter :
283
283
"""Count exceptions in a block of code or function.
284
284
285
285
Can be used as a function decorator or context manager.
@@ -675,13 +675,13 @@ class Enum(MetricWrapperBase):
675
675
def __init__ (self ,
676
676
name : str ,
677
677
documentation : str ,
678
- labelnames : Sequence [str ]= (),
679
- namespace : str = '' ,
680
- subsystem : str = '' ,
681
- unit : str = '' ,
682
- registry : CollectorRegistry = REGISTRY ,
683
- _labelvalues : Optional [Sequence [str ]]= None ,
684
- states : Optional [Sequence [str ]]= None ,
678
+ labelnames : Sequence [str ] = (),
679
+ namespace : str = '' ,
680
+ subsystem : str = '' ,
681
+ unit : str = '' ,
682
+ registry : CollectorRegistry = REGISTRY ,
683
+ _labelvalues : Optional [Sequence [str ]] = None ,
684
+ states : Optional [Sequence [str ]] = None ,
685
685
):
686
686
super ().__init__ (
687
687
name = name ,
0 commit comments