ukify: include the invalid value in boolean errors

The invalid-boolean error contains a literal f-string prefix and
placeholder, hiding the value that failed to parse. Format the message
to include the rejected value.

(cherry picked from commit aeef38045e74dc585088a64c601166f989705d75)
This commit is contained in:
Jonghyun An
2026-10-16 11:36:33 +01:00
committed by Luca Boccassi
parent e9ba92f7f0
commit db049fc898
+1 -1
View File
@@ -1935,7 +1935,7 @@ class ConfigItem:
return True
if s_l in {'0', 'false', 'no', 'n', 'f', 'off'}:
return False
raise ValueError('f"Invalid boolean literal: {s!r}')
raise ValueError(f'Invalid boolean literal: {s!r}')
# arguments for argparse.ArgumentParser.add_argument()
name: Union[str, tuple[str, str]]