From 4f0797ad22d54e8ae63ee7c8a02cae18530e10a5 Mon Sep 17 00:00:00 2001 From: jtvhd6 Date: Fri, 26 Jun 2026 19:34:08 -0500 Subject: [PATCH] fix: handle decimal string input in intword() --- src/humanize/number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/humanize/number.py b/src/humanize/number.py index 1cbfc2b..0dc97f9 100644 --- a/src/humanize/number.py +++ b/src/humanize/number.py @@ -231,7 +231,7 @@ def intword(value: NumberOrString, format: str = "%.1f") -> str: try: if not math.isfinite(float(value)): return _format_not_finite(float(value)) - value = int(value) + value = int(float(value)) except (TypeError, ValueError): return str(value)