summaryrefslogtreecommitdiff
path: root/cmd2/parsing.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-09 22:45:53 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2020-01-09 22:45:53 -0500
commit591bd29cb4a3bcb9b1f40ffc1f30429c6501ebdb (patch)
tree46c1e3af762c9cb222c6ae90bf0446d6eca4b388 /cmd2/parsing.py
parent10b844809e3a9500274dc4af4e780708975ba905 (diff)
parentd4556962799e68ea4d54ff86186428d17edcaef9 (diff)
downloadcmd2-git-591bd29cb4a3bcb9b1f40ffc1f30429c6501ebdb.tar.gz
Merge branch 'master' into generating_output_docs
# Conflicts: # docs/features/generating_output.rst # docs/features/settings.rst
Diffstat (limited to 'cmd2/parsing.py')
-rwxr-xr-xcmd2/parsing.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py
index 4e690b0b..cef0b088 100755
--- a/cmd2/parsing.py
+++ b/cmd2/parsing.py
@@ -13,9 +13,10 @@ from . import utils
def shlex_split(str_to_split: str) -> List[str]:
- """A wrapper around shlex.split() that uses cmd2's preferred arguments.
+ """
+ A wrapper around shlex.split() that uses cmd2's preferred arguments.
+ This allows other classes to easily call split() the same way StatementParser does.
- This allows other classes to easily call split() the same way StatementParser does
:param str_to_split: the string being split
:return: A list of tokens
"""
@@ -26,8 +27,8 @@ def shlex_split(str_to_split: str) -> List[str]:
class MacroArg:
"""
Information used to replace or unescape arguments in a macro value when the macro is resolved
- Normal argument syntax : {5}
- Escaped argument syntax: {{5}}
+ Normal argument syntax: {5}
+ Escaped argument syntax: {{5}}
"""
# The starting index of this argument in the macro value
start_index = attr.ib(validator=attr.validators.instance_of(int))