Skip to content

Commit 0d492fa

Browse files
author
BabyEntchen
committed
New example
1 parent f27ea0c commit 0d492fa

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

examples/project_examples/password_checker.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ def generate_password() -> str:
1212

1313
def calc_strength(self, points: int):
1414
print(points)
15-
if points < 5:
16-
print("Very Bad! you should use a new password. Example: ", Color.basic,
15+
if points <= 15:
16+
print("You password is okay. Maybe use a new password. Example: " + self.generate_password())
17+
elif points <= 10:
18+
print("Bad! You should use a new password. Example: " + Color.basic,
1719
self.generate_password())
18-
elif points >= 5:
19-
print("Bad! you should use a new password. Example: " + Color.basic,
20+
if points < 5:
21+
print("Very Bad! You should use a new password. Example: ", Color.basic,
2022
self.generate_password())
21-
elif points <= 13:
22-
print("You password is okay. Maybe use a new password. Example: " + self.generate_password())
2323
else:
2424
print("Your password is fine!")
2525

@@ -44,4 +44,3 @@ def check_password(self):
4444

4545
if __name__ == "__main__":
4646
PasswordManager(Str(input("Your password: "))).check_password()
47-

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
from pathlib import Path
55

66

7-
VERSION = '0.0.2'
7+
VERSION = '0.1.0'
88
DESCRIPTION = 'Utils for strings in python'
99
this_directory = Path(__file__).parent
1010
LONG_DESCRIPTION = (this_directory / "README.md").read_text()
11+
URL = "https://github.com/BabyEntchen/string_py"
1112

1213
# Setting up
1314
setup(
1415
name="string_py",
1516
version=VERSION,
1617
author="BabyEntchen",
1718
author_email="<baby_entchen@web.de>",
19+
url=URL,
1820
description=DESCRIPTION,
1921
long_description_content_type="text/markdown",
2022
long_description=LONG_DESCRIPTION,

string_py/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = "string_py"
2-
__version__ = "0.0.2"
2+
__version__ = "0.1.0"
33
__license__ = "MIT"
44
__author__ = "BabyEntchen"
55
__copyright__ = "Copyright 2023 BabyEntchen"

string_py/string_py.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def table(values: list[list[str]], border: bool = True) -> str:
318318
Parameters
319319
----------
320320
:param values:`list[list[str]]`
321-
The values you want to print
321+
The values to create the table with
322322
:param border:`True`
323323
Set to `False` to remove the border
324324
:return:

0 commit comments

Comments
 (0)