diff options
| -rwxr-xr-x | examples/alias_startup.py | 2 | ||||
| -rwxr-xr-x | examples/arg_print.py | 2 | ||||
| -rwxr-xr-x | examples/async_printing.py | 14 | ||||
| -rwxr-xr-x | examples/cmd_as_argument.py | 2 | ||||
| -rwxr-xr-x | examples/decorator_example.py | 2 | ||||
| -rwxr-xr-x | examples/environment.py | 2 | ||||
| -rwxr-xr-x | examples/example.py | 2 | ||||
| -rwxr-xr-x | examples/exit_code.py | 2 | ||||
| -rwxr-xr-x | examples/help_categories.py | 2 | ||||
| -rwxr-xr-x | examples/migrating.py | 2 | ||||
| -rwxr-xr-x | examples/paged_output.py | 2 | ||||
| -rwxr-xr-x | examples/python_scripting.py | 2 | ||||
| -rwxr-xr-x | examples/remove_builtin_commands.py | 2 | ||||
| -rw-r--r-- | tests/conftest.py | 2 | ||||
| -rw-r--r-- | tests/test_argparse.py | 2 | ||||
| -rwxr-xr-x | tests/test_cmd2.py | 2 | ||||
| -rw-r--r-- | tests_isolated/test_commandset/conftest.py | 2 | ||||
| -rw-r--r-- | tests_isolated/test_commandset/test_argparse_subcommands.py | 2 |
18 files changed, 24 insertions, 24 deletions
diff --git a/examples/alias_startup.py b/examples/alias_startup.py index 3ddcc2fe..72e969fc 100755 --- a/examples/alias_startup.py +++ b/examples/alias_startup.py @@ -10,7 +10,7 @@ import cmd2 class AliasAndStartup(cmd2.Cmd): - """ Example cmd2 application where we create commands that just print the arguments they are called with.""" + """Example cmd2 application where we create commands that just print the arguments they are called with.""" def __init__(self): alias_script = os.path.join(os.path.dirname(__file__), '.cmd2rc') diff --git a/examples/arg_print.py b/examples/arg_print.py index 6736c74f..9663a67a 100755 --- a/examples/arg_print.py +++ b/examples/arg_print.py @@ -15,7 +15,7 @@ import cmd2 class ArgumentAndOptionPrinter(cmd2.Cmd): - """ Example cmd2 application where we create commands that just print the arguments they are called with.""" + """Example cmd2 application where we create commands that just print the arguments they are called with.""" def __init__(self): # Create command shortcuts which are typically 1 character abbreviations which can be used in place of a command diff --git a/examples/async_printing.py b/examples/async_printing.py index bcdbc8f0..4832bf0a 100755 --- a/examples/async_printing.py +++ b/examples/async_printing.py @@ -32,10 +32,10 @@ ALERTS = [ class AlerterApp(cmd2.Cmd): - """ An app that shows off async_alert() and async_update_prompt() """ + """An app that shows off async_alert() and async_update_prompt()""" def __init__(self, *args, **kwargs) -> None: - """ Initializer """ + """Initializer""" super().__init__(*args, **kwargs) self.prompt = "(APR)> " @@ -51,7 +51,7 @@ class AlerterApp(cmd2.Cmd): self.register_postloop_hook(self._postloop_hook) def _preloop_hook(self) -> None: - """ Start the alerter thread """ + """Start the alerter thread""" # This runs after cmdloop() acquires self.terminal_lock, which will be locked until the prompt appears. # Therefore this is the best place to start the alerter thread since there is no risk of it alerting # before the prompt is displayed. You can also start it via a command if its not something that should @@ -62,7 +62,7 @@ class AlerterApp(cmd2.Cmd): self._alerter_thread.start() def _postloop_hook(self) -> None: - """ Stops the alerter thread """ + """Stops the alerter thread""" # After this function returns, cmdloop() releases self.terminal_lock which could make the alerter # thread think the prompt is on screen. Therefore this is the best place to stop the alerter thread. @@ -72,7 +72,7 @@ class AlerterApp(cmd2.Cmd): self._alerter_thread.join() def do_start_alerts(self, _): - """ Starts the alerter thread """ + """Starts the alerter thread""" if self._alerter_thread.is_alive(): print("The alert thread is already started") else: @@ -81,7 +81,7 @@ class AlerterApp(cmd2.Cmd): self._alerter_thread.start() def do_stop_alerts(self, _): - """ Stops the alerter thread """ + """Stops the alerter thread""" self._stop_event.set() if self._alerter_thread.is_alive(): self._alerter_thread.join() @@ -167,7 +167,7 @@ class AlerterApp(cmd2.Cmd): return style(self.visible_prompt, fg=status_color) def _alerter_thread_func(self) -> None: - """ Prints alerts and updates the prompt any time the prompt is showing """ + """Prints alerts and updates the prompt any time the prompt is showing""" self._alert_count = 0 self._next_alert_time = 0 diff --git a/examples/cmd_as_argument.py b/examples/cmd_as_argument.py index 39332203..88010668 100755 --- a/examples/cmd_as_argument.py +++ b/examples/cmd_as_argument.py @@ -19,7 +19,7 @@ import cmd2 class CmdLineApp(cmd2.Cmd): - """ Example cmd2 application. """ + """Example cmd2 application.""" # Setting this true makes it run a shell command if a cmd2/cmd command doesn't exist # default_to_shell = True diff --git a/examples/decorator_example.py b/examples/decorator_example.py index 6a5e6b10..6848335c 100755 --- a/examples/decorator_example.py +++ b/examples/decorator_example.py @@ -19,7 +19,7 @@ import cmd2 class CmdLineApp(cmd2.Cmd): - """ Example cmd2 application. """ + """Example cmd2 application.""" def __init__(self, ip_addr=None, port=None, transcript_files=None): shortcuts = dict(cmd2.DEFAULT_SHORTCUTS) diff --git a/examples/environment.py b/examples/environment.py index 151c55af..3eaaa8d1 100755 --- a/examples/environment.py +++ b/examples/environment.py @@ -7,7 +7,7 @@ import cmd2 class EnvironmentApp(cmd2.Cmd): - """ Example cmd2 application. """ + """Example cmd2 application.""" def __init__(self): super().__init__() diff --git a/examples/example.py b/examples/example.py index a3d4e90b..4c527076 100755 --- a/examples/example.py +++ b/examples/example.py @@ -17,7 +17,7 @@ import cmd2 class CmdLineApp(cmd2.Cmd): - """ Example cmd2 application. """ + """Example cmd2 application.""" # Setting this true makes it run a shell command if a cmd2/cmd command doesn't exist # default_to_shell = True diff --git a/examples/exit_code.py b/examples/exit_code.py index 440fc595..23b172a1 100755 --- a/examples/exit_code.py +++ b/examples/exit_code.py @@ -10,7 +10,7 @@ import cmd2 class ReplWithExitCode(cmd2.Cmd): - """ Example cmd2 application where we can specify an exit code when existing.""" + """Example cmd2 application where we can specify an exit code when existing.""" def __init__(self): super().__init__() diff --git a/examples/help_categories.py b/examples/help_categories.py index 80c976c1..c5c9af86 100755 --- a/examples/help_categories.py +++ b/examples/help_categories.py @@ -23,7 +23,7 @@ def my_decorator(f): class HelpCategories(cmd2.Cmd): - """ Example cmd2 application. """ + """Example cmd2 application.""" START_TIMES = ['now', 'later', 'sometime', 'whenever'] diff --git a/examples/migrating.py b/examples/migrating.py index e7c2f19e..fab40d25 100755 --- a/examples/migrating.py +++ b/examples/migrating.py @@ -8,7 +8,7 @@ import random class CmdLineApp(cmd.Cmd): - """ Example cmd application. """ + """Example cmd application.""" MUMBLES = ['like', '...', 'um', 'er', 'hmmm', 'ahh'] MUMBLE_FIRST = ['so', 'like', 'well'] diff --git a/examples/paged_output.py b/examples/paged_output.py index 796f47a8..afed8a6e 100755 --- a/examples/paged_output.py +++ b/examples/paged_output.py @@ -11,7 +11,7 @@ import cmd2 class PagedOutput(cmd2.Cmd): - """ Example cmd2 application which shows how to display output using a pager.""" + """Example cmd2 application which shows how to display output using a pager.""" def __init__(self): super().__init__() diff --git a/examples/python_scripting.py b/examples/python_scripting.py index 33d8010d..7e729202 100755 --- a/examples/python_scripting.py +++ b/examples/python_scripting.py @@ -30,7 +30,7 @@ from cmd2 import ( class CmdLineApp(cmd2.Cmd): - """ Example cmd2 application to showcase conditional control flow in Python scripting within cmd2 apps.""" + """Example cmd2 application to showcase conditional control flow in Python scripting within cmd2 apps.""" def __init__(self): # Set include_ipy to True to enable the "ipy" command which runs an interactive IPython shell diff --git a/examples/remove_builtin_commands.py b/examples/remove_builtin_commands.py index b0b19447..67541a84 100755 --- a/examples/remove_builtin_commands.py +++ b/examples/remove_builtin_commands.py @@ -13,7 +13,7 @@ import cmd2 class RemoveBuiltinCommands(cmd2.Cmd): - """ Example cmd2 application where we remove some unused built-in commands.""" + """Example cmd2 application where we remove some unused built-in commands.""" def __init__(self): super().__init__() diff --git a/tests/conftest.py b/tests/conftest.py index c605a73e..a5c47d97 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -141,7 +141,7 @@ def normalize(block): def run_cmd(app, cmd): - """ Clear out and err StdSim buffers, run the command, and return out and err """ + """Clear out and err StdSim buffers, run the command, and return out and err""" saved_sysout = sys.stdout sys.stdout = app.stdout diff --git a/tests/test_argparse.py b/tests/test_argparse.py index 0fbc44f0..16664d7e 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -244,7 +244,7 @@ def test_preservelist(argparse_app): class SubcommandApp(cmd2.Cmd): - """ Example cmd2 application where we a base command which has a couple subcommands.""" + """Example cmd2 application where we a base command which has a couple subcommands.""" def __init__(self): cmd2.Cmd.__init__(self) diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index 7595327f..fb4c9d76 100755 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -2304,7 +2304,7 @@ def test_get_help_topics_hidden(): class ReplWithExitCode(cmd2.Cmd): - """ Example cmd2 application where we can specify an exit code when existing.""" + """Example cmd2 application where we can specify an exit code when existing.""" def __init__(self): super().__init__(allow_cli_args=False) diff --git a/tests_isolated/test_commandset/conftest.py b/tests_isolated/test_commandset/conftest.py index dbf54b04..32def64d 100644 --- a/tests_isolated/test_commandset/conftest.py +++ b/tests_isolated/test_commandset/conftest.py @@ -142,7 +142,7 @@ def normalize(block): def run_cmd(app, cmd): - """ Clear out and err StdSim buffers, run the command, and return out and err """ + """Clear out and err StdSim buffers, run the command, and return out and err""" saved_sysout = sys.stdout sys.stdout = app.stdout diff --git a/tests_isolated/test_commandset/test_argparse_subcommands.py b/tests_isolated/test_commandset/test_argparse_subcommands.py index 1b2001b5..753806e8 100644 --- a/tests_isolated/test_commandset/test_argparse_subcommands.py +++ b/tests_isolated/test_commandset/test_argparse_subcommands.py @@ -17,7 +17,7 @@ from .conftest import ( class SubcommandSet(cmd2.CommandSet): - """ Example cmd2 application where we a base command which has a couple subcommands.""" + """Example cmd2 application where we a base command which has a couple subcommands.""" def __init__(self, dummy): super(SubcommandSet, self).__init__() |
