Skip to content

Commit 8befe9e

Browse files
committed
Making build_settables() public again
1 parent 21dab8b commit 8befe9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
205205

206206
# A dictionary mapping settable names to their Settable instance
207207
self.settables = dict()
208-
self._build_settables()
208+
self.build_settables()
209209

210210
# Use as prompt for multiline commands on the 2nd+ line of input
211211
self.continuation_prompt = '> '
@@ -405,8 +405,8 @@ def remove_settable(self, name: str) -> None:
405405
except KeyError:
406406
raise KeyError(name + " is not a settable parameter")
407407

408-
def _build_settables(self):
409-
"""Add default settables"""
408+
def build_settables(self):
409+
"""Create the dictionary of user-settable parameters"""
410410
self.add_settable(Settable('allow_style', str,
411411
'Allow ANSI text style sequences in output (valid values: '
412412
'{}, {}, {})'.format(ansi.STYLE_TERMINAL,

cmd2/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ def __init__(self, self_stdout: Union[StdSim, TextIO], sys_stdout: Union[StdSim,
685685
def basic_complete(text: str, line: str, begidx: int, endidx: int, match_against: Iterable) -> List[str]:
686686
"""
687687
Basic tab completion function that matches against a list of strings without considering line contents
688-
or cursor position. The args required by this function are defined in the header of Pythons's cmd.py.
688+
or cursor position. The args required by this function are defined in the header of Python's cmd.py.
689689
690690
:param text: the string prefix we are attempting to match (all matches must begin with it)
691691
:param line: the current input line with leading whitespace removed

0 commit comments

Comments
 (0)