summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-28 18:13:16 -0500
committerGitHub <noreply@github.com>2020-02-28 18:13:16 -0500
commit405eb7998196aaf5ece37ca4e97c7dc6d821aabe (patch)
treedb0c7106c7146f8fcbc1daa0b1e4a110b816710c
parent21dab8b1664dcd88a1872f394890460977e01632 (diff)
parent8befe9e38f28e05daf2814e62cd751337aad044a (diff)
downloadcmd2-git-405eb7998196aaf5ece37ca4e97c7dc6d821aabe.tar.gz
Merge pull request #902 from python-cmd2/public_method
Making build_settables() public again
-rw-r--r--cmd2/cmd2.py6
-rw-r--r--cmd2/utils.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 7bee1b6a..4ab3df3f 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -205,7 +205,7 @@ class Cmd(cmd.Cmd):
# A dictionary mapping settable names to their Settable instance
self.settables = dict()
- self._build_settables()
+ self.build_settables()
# Use as prompt for multiline commands on the 2nd+ line of input
self.continuation_prompt = '> '
@@ -405,8 +405,8 @@ class Cmd(cmd.Cmd):
except KeyError:
raise KeyError(name + " is not a settable parameter")
- def _build_settables(self):
- """Add default settables"""
+ def build_settables(self):
+ """Create the dictionary of user-settable parameters"""
self.add_settable(Settable('allow_style', str,
'Allow ANSI text style sequences in output (valid values: '
'{}, {}, {})'.format(ansi.STYLE_TERMINAL,
diff --git a/cmd2/utils.py b/cmd2/utils.py
index f119999a..8b5e9cc8 100644
--- a/cmd2/utils.py
+++ b/cmd2/utils.py
@@ -685,7 +685,7 @@ class RedirectionSavedState:
def basic_complete(text: str, line: str, begidx: int, endidx: int, match_against: Iterable) -> List[str]:
"""
Basic tab completion function that matches against a list of strings without considering line contents
- or cursor position. The args required by this function are defined in the header of Pythons's cmd.py.
+ or cursor position. The args required by this function are defined in the header of Python's cmd.py.
:param text: the string prefix we are attempting to match (all matches must begin with it)
:param line: the current input line with leading whitespace removed