mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Fixed D401
This commit is contained in:
parent
3a87210463
commit
8fbb8e8590
1 changed files with 5 additions and 6 deletions
|
@ -9,8 +9,7 @@ from slpkg.views.asciibox import AsciiBox
|
|||
|
||||
|
||||
class ProgressBar(Configs):
|
||||
"""Progress bar that show spinner instead of the
|
||||
of the file progress."""
|
||||
"""Progress spinner bar."""
|
||||
|
||||
def __init__(self):
|
||||
super(Configs, self).__init__()
|
||||
|
@ -23,7 +22,7 @@ class ProgressBar(Configs):
|
|||
self.bar_message: str = ''
|
||||
|
||||
def progress_bar(self, message: str, filename: str = None) -> None:
|
||||
"""Creating progress bar."""
|
||||
"""Create the progress bar."""
|
||||
self.assign_spinner_chars()
|
||||
self.set_spinner()
|
||||
self.assign_spinner_colors()
|
||||
|
@ -42,7 +41,7 @@ class ProgressBar(Configs):
|
|||
raise SystemExit(1) from e
|
||||
|
||||
def assign_spinner_colors(self) -> None:
|
||||
"""Assign spinner colors. """
|
||||
"""Assign spinner colors."""
|
||||
self.spinners_color: dict = {
|
||||
'green': self.green,
|
||||
'violet': self.violet,
|
||||
|
@ -79,14 +78,14 @@ class ProgressBar(Configs):
|
|||
f"{message}... ")
|
||||
|
||||
def set_spinner(self) -> None:
|
||||
"""Spinners characters."""
|
||||
"""Spanners characters."""
|
||||
try:
|
||||
self.spinner: tuple = self.spinners[self.progress_spinner]
|
||||
except KeyError:
|
||||
self.spinner: tuple = self.spinners['spinner']
|
||||
|
||||
def set_color(self) -> None:
|
||||
"""Setting the spinner color."""
|
||||
"""Set the spinner color."""
|
||||
try:
|
||||
self.color: str = self.spinners_color[self.spinner_color]
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in a new issue