From fc1d4695537baad0606c818747bc4f858742f789 Mon Sep 17 00:00:00 2001 From: Michelle Hunn Date: Tue, 30 Jan 2024 16:20:23 -0800 Subject: [PATCH 1/3] fix: update example decrypt_password --- src/passwordler/decrypt_password.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/passwordler/decrypt_password.py b/src/passwordler/decrypt_password.py index 0a11cfd..b249217 100644 --- a/src/passwordler/decrypt_password.py +++ b/src/passwordler/decrypt_password.py @@ -23,8 +23,9 @@ def decrypt_password(encrypted_message, random_seed = 123): seed is utilized to maintain consistent decryption results when needed. Example: - >>> encrypted = encrypt_password('Monty Python', random_seed = 123) - >>> decrypted = decrypt_password(encrypted, random_seed = 123) + >>> original_message = 'Monty Python' + >>> encrypted_message = encrypt_password(original_message, random_seed = 123) + >>> decrypted_message = decrypt_password(encrypted_message, random_seed = 123) Output: 'Monty Python' """ From f41a242e39166658279c7ec60e8c69ce649ef6bc Mon Sep 17 00:00:00 2001 From: Michelle Hunn Date: Tue, 30 Jan 2024 16:24:47 -0800 Subject: [PATCH 2/3] add example to generate_password --- src/passwordler/generate_password.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/passwordler/generate_password.py b/src/passwordler/generate_password.py index 1a452a6..49ec381 100644 --- a/src/passwordler/generate_password.py +++ b/src/passwordler/generate_password.py @@ -15,6 +15,12 @@ def generate_password(length=12, include_symbols=True, include_numbers=True): Returns: str: A randomly generated password. + + Example: + >>> generate_password() + Output: ',tKC]m"wDJ34' + >>> generate_password(include_symbols=False, include_numbers=False) + Output: 'NJfVKhgnrJYa' """ if not isinstance(length, int): From da9cd77955d29251473df4098dcfca8e48f4db6b Mon Sep 17 00:00:00 2001 From: Michelle Hunn Date: Tue, 30 Jan 2024 16:31:00 -0800 Subject: [PATCH 3/3] fix: added and updated examples in functions --- src/passwordler/decrypt_password.py | 1 - src/passwordler/password_strength.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/passwordler/decrypt_password.py b/src/passwordler/decrypt_password.py index b249217..8af5135 100644 --- a/src/passwordler/decrypt_password.py +++ b/src/passwordler/decrypt_password.py @@ -27,7 +27,6 @@ def decrypt_password(encrypted_message, random_seed = 123): >>> encrypted_message = encrypt_password(original_message, random_seed = 123) >>> decrypted_message = decrypt_password(encrypted_message, random_seed = 123) Output: 'Monty Python' - """ if not isinstance(encrypted_message, str): raise TypeError( diff --git a/src/passwordler/password_strength.py b/src/passwordler/password_strength.py index 7ab3ade..8db2361 100644 --- a/src/passwordler/password_strength.py +++ b/src/passwordler/password_strength.py @@ -14,6 +14,12 @@ def password_strength(password): Returns: str: a rating of either 'weak', 'good' or 'strong' + + Example: + >>> password_strength('baseball') + Output: 'Your password is: Weak' + >>> password_strength('Baseball4life!') + Output: 'Your password is: Strong' """ if not isinstance(password, str): raise TypeError("'password' should be of type 'string'")