Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ec28c20

Browse files
author
Tom McCarthy
committedSep 17, 2020
chore: fix type hint
1 parent 6916626 commit ec28c20

File tree

1 file changed

+2
-2
lines changed
  • aws_lambda_powertools/metrics

1 file changed

+2
-2
lines changed
 

‎aws_lambda_powertools/metrics/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(
9494
self._metric_unit_options = list(MetricUnit.__members__)
9595
self.metadata_set = self.metadata_set if metadata_set is not None else {}
9696

97-
def add_metric(self, name: str, unit: MetricUnit, value: Union[float, int]):
97+
def add_metric(self, name: str, unit: Union[MetricUnit, str], value: Union[float, int]):
9898
"""Adds given metric
9999
100100
Example
@@ -111,7 +111,7 @@ def add_metric(self, name: str, unit: MetricUnit, value: Union[float, int]):
111111
----------
112112
name : str
113113
Metric name
114-
unit : MetricUnit
114+
unit : Union[MetricUnit, str]
115115
`aws_lambda_powertools.helper.models.MetricUnit`
116116
value : Union[float, int]
117117
Metric value

0 commit comments

Comments
 (0)
Please sign in to comment.