Updated for typing

This commit is contained in:
Dimitris Zlatanidis 2023-03-15 13:00:12 +02:00
parent 4ed518b1b1
commit 6918924dfc

View file

@ -25,14 +25,14 @@ class ProgressBar(Configs):
def bar(self, message: str, filename: str) -> None:
""" Creating progress bar. """
spinners = {
spinners: dict = {
'pixel': PixelSpinner,
'line': LineSpinner,
'moon': MoonSpinner,
'pie': PieSpinner,
'spinner': Spinner
}
colors = {
colors: dict = {
'green': self.green,
'violet': self.violet,
'yellow': self.yellow,
@ -45,10 +45,10 @@ class ProgressBar(Configs):
try:
spinner = spinners[self.progress_spinner]
color = colors[self.spinner_color]
color: str = colors[self.spinner_color]
except KeyError:
spinner = PixelSpinner
color = self.endc
color: str = self.endc
bar_spinner = spinner(f'{self.endc}{message} {filename} {color}')
# print('\033[F', end='', flush=True)