Skip to content

Commit

Permalink
Update Utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
p4tit0 authored Jul 25, 2023
1 parent 134425b commit 3e5ac31
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions routexplorer/utils/Utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Sequence

class Utils:
"""
Utility class for miscellaneous functions.
Expand All @@ -21,14 +23,10 @@ def generate_load(end: int, progress: int, name: str):
"""
percentage = int((progress / end) * 100)
print(
f"{percentage:03}% [" + "■" * (percentage // 10) + "□" * (10 - (percentage // 10)) + f"] - {name}",
end="\r" if percentage < 100 else "\n"
)progress // end) * 100
print(
f"{percentage:03}% [" + "■" * (percentage // 10) + "□" * (10 - (percentage // 10)) + f"] - {name}",
f"{percentage:3d}% [" + "■" * (percentage // 10) + "□" * (10 - (percentage // 10)) + f"] - {name}",
end="\r" if percentage < 100 else "\n"
)

@staticmethod
def find(sequence: Sequence[any], target: any) -> bool:
"""check if a given value is present in a sequence.
Expand Down

0 comments on commit 3e5ac31

Please sign in to comment.