Skip to content

Commit 3083e2d

Browse files
committed
Updated docstrings.
1 parent 5cc5bcc commit 3083e2d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

examples/async_printing.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ def _preloop_hook(self) -> None:
7575
self._add_alert_thread.start()
7676

7777
def _postloop_hook(self) -> None:
78-
"""Stops the alerter thread."""
78+
"""Stop the alerter thread."""
7979
self._stop_event.set()
8080
if self._add_alert_thread.is_alive():
8181
self._add_alert_thread.join()
8282

8383
def do_start_alerts(self, _: cmd2.Statement) -> None:
84-
"""Starts the alerter thread."""
84+
"""Start the alerter thread."""
8585
if self._add_alert_thread.is_alive():
8686
print("The alert thread is already started")
8787
else:
@@ -90,15 +90,16 @@ def do_start_alerts(self, _: cmd2.Statement) -> None:
9090
self._add_alert_thread.start()
9191

9292
def do_stop_alerts(self, _: cmd2.Statement) -> None:
93-
"""Stops the alerter thread."""
93+
"""Stop the alerter thread."""
9494
self._stop_event.set()
9595
if self._add_alert_thread.is_alive():
9696
self._add_alert_thread.join()
9797
else:
9898
print("The alert thread is already stopped")
9999

100100
def _build_colored_prompt(self) -> str:
101-
"""Randomly builds a colored prompt
101+
"""Randomly build a colored prompt.
102+
102103
:return: the new prompt.
103104
"""
104105
rand_num = self._secure_generator.randint(1, 6)
@@ -119,7 +120,7 @@ def _build_colored_prompt(self) -> str:
119120
return stylize(self.visible_prompt, style=status_color)
120121

121122
def _add_alerts_func(self) -> None:
122-
"""Prints alerts and updates the prompt any time the prompt is showing."""
123+
"""Print alerts and update the prompt any time the prompt is showing."""
123124
self._alert_count = 0
124125

125126
alerts = get_alerts()

0 commit comments

Comments
 (0)