Skip to content

Commit

Permalink
Updated some code comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
alda-optimizely committed Sep 12, 2017
1 parent ac066d0 commit 57200c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions optimizely/helpers/event_tag_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def get_numeric_value(event_tags, logger=None):
logger: Optional logger.
Returns:
A float numeric metric value when the provided numeric metric value
are in the following format:
A float numeric metric value is returned when the provided numeric
metric value are in the following format:
- A string (properly formatted, e.g., no commas)
- An integer
- A float or double
Expand All @@ -74,6 +74,7 @@ def get_numeric_value(event_tags, logger=None):
try:
if isinstance(numeric_metric_value, (numbers.Integral, float, str)):
# Attempt to convert the numeric metric value to a float
# (if it isn't already a float).
cast_numeric_metric_value = float(numeric_metric_value)

# If not a float after casting, then make everything else a None.
Expand Down

0 comments on commit 57200c9

Please sign in to comment.