From 668b78a6d4c2434ceb13af5793725602ac82052b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:13:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- conversions/roman_numerals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conversions/roman_numerals.py b/conversions/roman_numerals.py index a4eaa16b5..0c6e3edca 100644 --- a/conversions/roman_numerals.py +++ b/conversions/roman_numerals.py @@ -24,7 +24,7 @@ def roman_to_int(roman): vals = {roman: arabic for arabic, roman in ROMAN} i, total = 0, 0 while i < len(roman): - if i + 1 < len(roman) and roman[i + 1] == "_": + if i + 1 < len(roman) and roman[i + 1] == "_": total += vals[roman[i] + "_"] i += 2 else: @@ -52,7 +52,7 @@ def int_to_roman(number): if number == 0: break return "".join(result) - + if __name__ == "__main__": import doctest doctest.testmod()