From 3a50995dc9a424ca639225b0691b9d815918a9e9 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 7 Aug 2026 07:31:22 +0000 Subject: [PATCH] fix(hermes): A percentage is expressed per hundred. Dividing by 100 produces 90.0 for 10%, 0.0 for 100%, and 16.99 for 15% of 19.99 while preserving existing validation and rounding. (incident hermes-code-demo/10) --- src/discount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discount.py b/src/discount.py index a8ccce9..9ebbc19 100644 --- a/src/discount.py +++ b/src/discount.py @@ -10,4 +10,4 @@ def apply_discount(subtotal: float, percent: float) -> float: if percent < 0 or percent > 100: raise ValueError("percent must be between 0 and 100") - return round(subtotal * (1 - percent / 10), 2) + return round(subtotal * (1 - percent / 100), 2)