Skip to content

Commit 8e0a67e

Browse files
committed
Fixed strings and types in getting_started.py
1 parent 8dd77d0 commit 8e0a67e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

examples/getting_started.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
2-
"""A simple example cmd2 application demonstrating the following:
2+
"""A simple example cmd2 application demonstrating many common features.
3+
4+
Features demonstrated include all of the following:
35
1) Colorizing/stylizing output
46
2) Using multiline commands
57
3) Persistent history
@@ -25,9 +27,12 @@
2527

2628

2729
class BasicApp(cmd2.Cmd):
30+
"""Cmd2 application to demonstrate many common features."""
31+
2832
CUSTOM_CATEGORY = 'My Custom Commands'
2933

3034
def __init__(self) -> None:
35+
"""Initialize the cmd2 application."""
3136
# Startup script that defines a couple aliases for running shell commands
3237
alias_script = pathlib.Path(__file__).absolute().parent / '.cmd2rc'
3338

@@ -39,7 +44,7 @@ def __init__(self) -> None:
3944
multiline_commands=['echo'],
4045
persistent_history_file='cmd2_history.dat',
4146
shortcuts=shortcuts,
42-
startup_script=alias_script,
47+
startup_script=str(alias_script),
4348
)
4449

4550
# Prints an intro banner once upon application startup
@@ -82,7 +87,7 @@ def do_intro(self, _: cmd2.Statement) -> None:
8287

8388
@cmd2.with_category(CUSTOM_CATEGORY)
8489
def do_echo(self, arg: cmd2.Statement) -> None:
85-
"""Example of a multiline command."""
90+
"""Multiline command."""
8691
self.poutput(
8792
stylize(
8893
arg,

0 commit comments

Comments
 (0)