This commit is contained in:
Ian McEwen
2026-05-31 10:17:27 -07:00
parent 3916009dbd
commit a7d13eb2c1
2 changed files with 24 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ FIELD_OPTIONS = frozenset(
def parse_value(s: str) -> Any:
"""Convert an option value string to an appropriate Python type."""
if s.lstrip("-").isdigit():
if re.fullmatch(r"-?[0-9]+", s):
return int(s)
if s.lower() == "true":
return True