diff --git a/hbd/common/proto.py b/hbd/common/proto.py index 82b7ee3..d847366 100644 --- a/hbd/common/proto.py +++ b/hbd/common/proto.py @@ -52,12 +52,17 @@ def decode_value(val: str) -> Any: except Exception: return val[1:] # Return as string without @ - # Try numeric evaluation (original behavior) + # Try numeric conversion (avoid eval to prevent SyntaxWarnings on version strings) if val[0].isdigit() or (val[0] == '-' and len(val) > 1 and val[1].isdigit()): try: - return eval(val) - except Exception: - return val + return int(val) + except ValueError: + pass + try: + return float(val) + except ValueError: + pass + return val return val