From 6cb882e3420fef1497955c9b4c7f0d8674e1557d Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Wed, 20 Feb 2019 22:56:25 -0500 Subject: Changed examples to reflect that settable doesn't need to be updated before calling init() --- tests/test_transcript.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_transcript.py') diff --git a/tests/test_transcript.py b/tests/test_transcript.py index d7438e86..6bfe187e 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -32,10 +32,11 @@ class CmdLineApp(cmd2.Cmd): self.multiline_commands = ['orate'] self.maxrepeats = 3 - # Add stuff to settable and/or shortcuts before calling base class initializer + super().__init__(*args, **kwargs) + + # Make maxrepeats settable at runtime self.settable['maxrepeats'] = 'Max number of `--repeat`s allowed' - super().__init__(*args, **kwargs) self.intro = 'This is an intro banner ...' speak_parser = argparse.ArgumentParser() -- cgit v1.2.1