Skip to content

Commit cd5ba39

Browse files
update: fix return type for numeric_metric_value in get_numeric_value and ensure key is of bytes type in hash128
1 parent 180fdee commit cd5ba39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

optimizely/helpers/event_tag_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ def get_numeric_value(event_tags: Optional[EventTags], logger: Optional[Logger]
141141
' is in an invalid format and will not be sent to results.'
142142
)
143143

144-
return numeric_metric_value # type: ignore[no-any-return]
144+
return numeric_metric_value

optimizely/lib/pymmh3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def fmix(h: int) -> int:
399399

400400
return h4 << 96 | h3 << 64 | h2 << 32 | h1
401401

402-
key = bytearray(xencode(key))
402+
key = bytes(xencode(key))
403403

404404
if x64arch:
405405
return hash128_x64(key, seed)

0 commit comments

Comments
 (0)