Adds necessary spaces

Introduces spaces between code blocks.
This commit is contained in:
Andres Caicedo
2023-04-04 11:36:50 +02:00
parent 621f18eba7
commit 62615cacc9
4 changed files with 12 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ class Spinner:
self.running = False
self.spinner_thread = None
def spin(self):
"""Spin the spinner"""
while self.running:
@@ -22,12 +23,14 @@ class Spinner:
time.sleep(self.delay)
sys.stdout.write('\b' * (len(self.message) + 2))
def __enter__(self):
"""Start the spinner"""
self.running = True
self.spinner_thread = threading.Thread(target=self.spin)
self.spinner_thread.start()
def __exit__(self, exc_type, exc_value, exc_traceback):
"""Stop the spinner"""
self.running = False