MCPcopy
hub / github.com/subframe7536/maple-font / patch_single_value

Function patch_single_value

source/py/utils.py:489–493  ·  view source on GitHub ↗
(obj, attr: str)

Source from the content-addressed store, hash-verified

487 }
488
489 def patch_single_value(obj, attr: str) -> None:
490 current_value = int(getattr(obj, attr))
491 weight_name = value_to_name.get(current_value)
492 if weight_name and weight_name in all_weight_map:
493 setattr(obj, attr, all_weight_map[weight_name])
494
495 def patch_range_value(av) -> None:
496 current_value = int(av.NominalValue)

Callers 1

patch_instanceFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected