Skip to content

Commit a6dcc37

Browse files
committed
Style changes from running black on Python 3.9
1 parent fe2f5bd commit a6dcc37

18 files changed

+24
-24
lines changed

examples/alias_startup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class AliasAndStartup(cmd2.Cmd):
13-
""" Example cmd2 application where we create commands that just print the arguments they are called with."""
13+
"""Example cmd2 application where we create commands that just print the arguments they are called with."""
1414

1515
def __init__(self):
1616
alias_script = os.path.join(os.path.dirname(__file__), '.cmd2rc')

examples/arg_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
class ArgumentAndOptionPrinter(cmd2.Cmd):
18-
""" Example cmd2 application where we create commands that just print the arguments they are called with."""
18+
"""Example cmd2 application where we create commands that just print the arguments they are called with."""
1919

2020
def __init__(self):
2121
# Create command shortcuts which are typically 1 character abbreviations which can be used in place of a command

examples/async_printing.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232

3333

3434
class AlerterApp(cmd2.Cmd):
35-
""" An app that shows off async_alert() and async_update_prompt() """
35+
"""An app that shows off async_alert() and async_update_prompt()"""
3636

3737
def __init__(self, *args, **kwargs) -> None:
38-
""" Initializer """
38+
"""Initializer"""
3939
super().__init__(*args, **kwargs)
4040

4141
self.prompt = "(APR)> "
@@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs) -> None:
5151
self.register_postloop_hook(self._postloop_hook)
5252

5353
def _preloop_hook(self) -> None:
54-
""" Start the alerter thread """
54+
"""Start the alerter thread"""
5555
# This runs after cmdloop() acquires self.terminal_lock, which will be locked until the prompt appears.
5656
# Therefore this is the best place to start the alerter thread since there is no risk of it alerting
5757
# before the prompt is displayed. You can also start it via a command if its not something that should
@@ -62,7 +62,7 @@ def _preloop_hook(self) -> None:
6262
self._alerter_thread.start()
6363

6464
def _postloop_hook(self) -> None:
65-
""" Stops the alerter thread """
65+
"""Stops the alerter thread"""
6666

6767
# After this function returns, cmdloop() releases self.terminal_lock which could make the alerter
6868
# thread think the prompt is on screen. Therefore this is the best place to stop the alerter thread.
@@ -72,7 +72,7 @@ def _postloop_hook(self) -> None:
7272
self._alerter_thread.join()
7373

7474
def do_start_alerts(self, _):
75-
""" Starts the alerter thread """
75+
"""Starts the alerter thread"""
7676
if self._alerter_thread.is_alive():
7777
print("The alert thread is already started")
7878
else:
@@ -81,7 +81,7 @@ def do_start_alerts(self, _):
8181
self._alerter_thread.start()
8282

8383
def do_stop_alerts(self, _):
84-
""" Stops the alerter thread """
84+
"""Stops the alerter thread"""
8585
self._stop_event.set()
8686
if self._alerter_thread.is_alive():
8787
self._alerter_thread.join()
@@ -167,7 +167,7 @@ def _generate_colored_prompt(self) -> str:
167167
return style(self.visible_prompt, fg=status_color)
168168

169169
def _alerter_thread_func(self) -> None:
170-
""" Prints alerts and updates the prompt any time the prompt is showing """
170+
"""Prints alerts and updates the prompt any time the prompt is showing"""
171171

172172
self._alert_count = 0
173173
self._next_alert_time = 0

examples/cmd_as_argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class CmdLineApp(cmd2.Cmd):
22-
""" Example cmd2 application. """
22+
"""Example cmd2 application."""
2323

2424
# Setting this true makes it run a shell command if a cmd2/cmd command doesn't exist
2525
# default_to_shell = True

examples/decorator_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
class CmdLineApp(cmd2.Cmd):
22-
""" Example cmd2 application. """
22+
"""Example cmd2 application."""
2323

2424
def __init__(self, ip_addr=None, port=None, transcript_files=None):
2525
shortcuts = dict(cmd2.DEFAULT_SHORTCUTS)

examples/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
class EnvironmentApp(cmd2.Cmd):
10-
""" Example cmd2 application. """
10+
"""Example cmd2 application."""
1111

1212
def __init__(self):
1313
super().__init__()

examples/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
class CmdLineApp(cmd2.Cmd):
20-
""" Example cmd2 application. """
20+
"""Example cmd2 application."""
2121

2222
# Setting this true makes it run a shell command if a cmd2/cmd command doesn't exist
2323
# default_to_shell = True

examples/exit_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class ReplWithExitCode(cmd2.Cmd):
13-
""" Example cmd2 application where we can specify an exit code when existing."""
13+
"""Example cmd2 application where we can specify an exit code when existing."""
1414

1515
def __init__(self):
1616
super().__init__()

examples/help_categories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def wrapper(*args, **kwds):
2323

2424

2525
class HelpCategories(cmd2.Cmd):
26-
""" Example cmd2 application. """
26+
"""Example cmd2 application."""
2727

2828
START_TIMES = ['now', 'later', 'sometime', 'whenever']
2929

examples/migrating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class CmdLineApp(cmd.Cmd):
11-
""" Example cmd application. """
11+
"""Example cmd application."""
1212

1313
MUMBLES = ['like', '...', 'um', 'er', 'hmmm', 'ahh']
1414
MUMBLE_FIRST = ['so', 'like', 'well']

0 commit comments

Comments
 (0)