From c74d4115435fae8e572f72227e028175ba3b0186 Mon Sep 17 00:00:00 2001 From: Jovaun Allen Date: Sat, 21 Feb 2026 10:19:13 -0800 Subject: [PATCH 1/2] Enhance factorial module documentation --- maths/factorial.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maths/factorial.py b/maths/factorial.py index ba61447c7564..09f2720ab8c3 100644 --- a/maths/factorial.py +++ b/maths/factorial.py @@ -1,7 +1,14 @@ """ Factorial of a positive integer -- https://en.wikipedia.org/wiki/Factorial """ +""" +Implementation of factorial algorithms (iterative and recursive). +Provides: +- Strict input validation +- Doctest examples +- Type hints +""" def factorial(number: int) -> int: """ From e28cb4798368e7e85e7e317e11e6d64458ae22d9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 21 Feb 2026 18:38:02 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- maths/factorial.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/maths/factorial.py b/maths/factorial.py index 09f2720ab8c3..93356ea8b151 100644 --- a/maths/factorial.py +++ b/maths/factorial.py @@ -1,6 +1,7 @@ """ Factorial of a positive integer -- https://en.wikipedia.org/wiki/Factorial """ + """ Implementation of factorial algorithms (iterative and recursive). @@ -10,6 +11,7 @@ - Type hints """ + def factorial(number: int) -> int: """ Calculate the factorial of specified number (n!).