From ac8eb44fc7af79b1d344693dea12203bbf05c29f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 8 Oct 2023 16:42:38 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- maths/armstrong_numbers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maths/armstrong_numbers.py b/maths/armstrong_numbers.py index 599c3ead6..1fddabd78 100644 --- a/maths/armstrong_numbers.py +++ b/maths/armstrong_numbers.py @@ -37,7 +37,7 @@ def pluperfect_number(n: int) -> bool: for digit in num_str: digit_histogram[int(digit)] += 1 - total = sum(cnt * (i ** num_digits) for i, cnt in enumerate(digit_histogram)) + total = sum(cnt * (i**num_digits) for i, cnt in enumerate(digit_histogram)) return n == total @@ -65,4 +65,3 @@ if __name__ == "__main__": doctest.testmod() main() -