summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-02-20 22:39:36 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-02-20 22:54:51 -0500
commit6e4d4801827559b3dc150b1dd29de482cfba2626 (patch)
tree77301b6c4a76369ea54bfccacfd00df9499623d5 /cmd2
parent5d49abe3623c0b3cc7b83c544eda64b35280a05e (diff)
downloadcmd2-git-6e4d4801827559b3dc150b1dd29de482cfba2626.tar.gz
No longer sorting settable during initialization since the show method already sorts it results
Diffstat (limited to 'cmd2')
-rw-r--r--cmd2/cmd2.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 216ecf74..65435d6b 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -31,7 +31,6 @@ Git repository on GitHub at https://github.com/python-cmd2/cmd2
# setting is True
import argparse
import cmd
-import collections
import glob
import inspect
import os
@@ -351,7 +350,6 @@ class Cmd(cmd.Cmd):
timing = False # Prints elapsed time for each command
# To make an attribute settable with the "do_set" command, add it to this ...
- # This starts out as a dictionary but gets converted to an OrderedDict sorted alphabetically by key
settable = {'colors': 'Allow colorized output (valid values: Terminal, Always, Never)',
'continuation_prompt': 'On 2nd+ line of input',
'debug': 'Show full error stack on error',
@@ -562,13 +560,10 @@ class Cmd(cmd.Cmd):
return utils.strip_ansi(self.prompt)
def _finalize_app_parameters(self) -> None:
- """Finalize the shortcuts and settable parameters."""
+ """Finalize the shortcuts"""
# noinspection PyUnresolvedReferences
self.shortcuts = sorted(self.shortcuts.items(), reverse=True)
- # Make sure settable parameters are sorted alphabetically by key
- self.settable = collections.OrderedDict(sorted(self.settable.items(), key=lambda t: t[0]))
-
def decolorized_write(self, fileobj: IO, msg: str) -> None:
"""Write a string to a fileobject, stripping ANSI escape sequences if necessary