mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-03 06:56:44 +01:00
Updated for typing
This commit is contained in:
parent
4ed518b1b1
commit
6918924dfc
1 changed files with 4 additions and 4 deletions
|
@ -25,14 +25,14 @@ class ProgressBar(Configs):
|
||||||
|
|
||||||
def bar(self, message: str, filename: str) -> None:
|
def bar(self, message: str, filename: str) -> None:
|
||||||
""" Creating progress bar. """
|
""" Creating progress bar. """
|
||||||
spinners = {
|
spinners: dict = {
|
||||||
'pixel': PixelSpinner,
|
'pixel': PixelSpinner,
|
||||||
'line': LineSpinner,
|
'line': LineSpinner,
|
||||||
'moon': MoonSpinner,
|
'moon': MoonSpinner,
|
||||||
'pie': PieSpinner,
|
'pie': PieSpinner,
|
||||||
'spinner': Spinner
|
'spinner': Spinner
|
||||||
}
|
}
|
||||||
colors = {
|
colors: dict = {
|
||||||
'green': self.green,
|
'green': self.green,
|
||||||
'violet': self.violet,
|
'violet': self.violet,
|
||||||
'yellow': self.yellow,
|
'yellow': self.yellow,
|
||||||
|
@ -45,10 +45,10 @@ class ProgressBar(Configs):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
spinner = spinners[self.progress_spinner]
|
spinner = spinners[self.progress_spinner]
|
||||||
color = colors[self.spinner_color]
|
color: str = colors[self.spinner_color]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
spinner = PixelSpinner
|
spinner = PixelSpinner
|
||||||
color = self.endc
|
color: str = self.endc
|
||||||
|
|
||||||
bar_spinner = spinner(f'{self.endc}{message} {filename} {color}')
|
bar_spinner = spinner(f'{self.endc}{message} {filename} {color}')
|
||||||
# print('\033[F', end='', flush=True)
|
# print('\033[F', end='', flush=True)
|
||||||
|
|
Loading…
Reference in a new issue