Fix for format_axis_value in json format script to handle None value

Add tests to cover such input.
This commit is contained in:
Oleksandr Pavlyk
2026-05-12 15:06:31 -05:00
parent 1eba884fb3
commit fae9dfca18
2 changed files with 64 additions and 0 deletions

View File

@@ -180,6 +180,9 @@ def format_axis_value(
name = axis_value["name"]
axis = axes_by_name.get(name, {})
value = axis_value["value"]
if value is None:
return name, ""
if axis.get("type") == "int64" and axis.get("flags") == "pow2":
int_value = int(value)
exponent = int_value.bit_length() - 1