From 7019e049ae460119641e3a2e42d7a07e02855a6c Mon Sep 17 00:00:00 2001 From: Harish Date: Fri, 20 Nov 2026 20:51:42 +0530 Subject: [PATCH 1/5] Fix length guard in alternative_password_generator(#15633) --- other/password.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/other/password.py b/other/password.py index 6b64bdb4d81a..b38df4da1f9c 100644 --- a/other/password.py +++ b/other/password.py @@ -29,6 +29,9 @@ def alternative_password_generator(chars_incl: str, i: int) -> str: # Password Generator = full boot with random_number, random_letters, and # random_character FUNCTIONS # Put your code here... + if i < len(chars_incl): + msg = "password length must be greater than or equal to the lenght of included characters." + raise ValueError(msg) i -= len(chars_incl) quotient = i // 3 remainder = i % 3 From 1df8d719907d0ca081382353cda1f4105e625c27 Mon Sep 17 00:00:00 2001 From: Harish Date: Fri, 20 Nov 2026 21:15:45 +0530 Subject: [PATCH 2/5] Fix spelling and line length in other/password/py (#15633) --- other/password.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/other/password.py b/other/password.py index b38df4da1f9c..12e66ff289d1 100644 --- a/other/password.py +++ b/other/password.py @@ -30,8 +30,9 @@ def alternative_password_generator(chars_incl: str, i: int) -> str: # random_character FUNCTIONS # Put your code here... if i < len(chars_incl): - msg = "password length must be greater than or equal to the lenght of included characters." - raise ValueError(msg) + raise ValueError( + "password length must be greater than or equal to the length of included characters." + ) i -= len(chars_incl) quotient = i // 3 remainder = i % 3 From 185bd278efc0a24f9470965c98ac376ccd21c259 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 15:46:50 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- other/password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/password.py b/other/password.py index 12e66ff289d1..a921c3c43c5c 100644 --- a/other/password.py +++ b/other/password.py @@ -32,7 +32,7 @@ def alternative_password_generator(chars_incl: str, i: int) -> str: if i < len(chars_incl): raise ValueError( "password length must be greater than or equal to the length of included characters." - ) + ) i -= len(chars_incl) quotient = i // 3 remainder = i % 3 From 2e9017065c6126bfcc99d82f8bb535e432f14d19 Mon Sep 17 00:00:00 2001 From: Harish Date: Fri, 20 Nov 2026 21:22:38 +0530 Subject: [PATCH 4/5] shorten line length in other/password.py (#15633) :wq --- other/password.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/other/password.py b/other/password.py index a921c3c43c5c..eea5ba958ad1 100644 --- a/other/password.py +++ b/other/password.py @@ -31,9 +31,9 @@ def alternative_password_generator(chars_incl: str, i: int) -> str: # Put your code here... if i < len(chars_incl): raise ValueError( - "password length must be greater than or equal to the length of included characters." + "password length must be greater than or " \ + "equal to the length of included characters." ) - i -= len(chars_incl) quotient = i // 3 remainder = i % 3 # chars = chars_incl + random_letters(ascii_letters, i / 3 + remainder) + From 67db308ac82291170e28e539d55c4d84ef8e0625 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:04:51 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- other/password.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/password.py b/other/password.py index eea5ba958ad1..4cc399d8c12d 100644 --- a/other/password.py +++ b/other/password.py @@ -31,7 +31,7 @@ def alternative_password_generator(chars_incl: str, i: int) -> str: # Put your code here... if i < len(chars_incl): raise ValueError( - "password length must be greater than or " \ + "password length must be greater than or " "equal to the length of included characters." ) quotient = i // 3