fix(hermes): Corrects the percentage conversion with a one-line localized change; it yields 90.0 for 100 at 10%, 0.0 at 100%, and 16.99 for 19.99 at 15%. (incident hermes-code-demo/8)

This commit is contained in:
Hermes Agent 2026-08-07 06:12:18 +00:00
parent 6c4428c893
commit 8558e402a0

View File

@ -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)