# Buggy code
def __init__(
    self,
    cli_ctx,
    style=None,
    completer=None,
    lexer=None,
    history=None,
    input_custom=sys.stdin,
    output_custom=None,
    user_feedback=False,
    intermediate_sleep=0.25,
    final_sleep=4,
):
    from .color_styles import style_factory

    self.cli_ctx = cli_ctx
    self.config = Configuration(cli_ctx.config, style=style)
    self.config.set_style(style)
    self.styles = style or style_factory(self.config.get_style())
    self.lexer = lexer or get_az_lexer(self.config) if self.styles else None
    try:
        self.completer = completer or AzCompleter(self, GatherCommands(self.config))
        self.completer.initialize_command_table_attributes()
    except IOError:  # if there is no cache
        self.completer = AzCompleter(self, None)
    self.history = history or FileHistory(
        os.path.join(self.config.config_dir, self.config.get_history())
    )
    os.environ[ENV_ADDITIONAL_USER_AGENT] = "AZURECLISHELL/" + __version__

    # OH WHAT FUN TO FIGURE OUT WHAT THESE ARE!
    self._cli = None
    self.layout = None
    self.description_docs = ""
    self.param_docs = ""
    self.example_docs = ""
    self.last = None
    self.last_exit = 0
    self.user_feedback = user_feedback
    self.input = input_custom
    self.output = output_custom
    self.config_default = ""
    self.default_command = ""
    self.threads = []
    self.curr_thread = None
    self.spin_val = -1
    self.intermediate_sleep = intermediate_sleep
    self.final_sleep = final_sleep
    self.command_table_thread = None

    # try to consolidate state information here...
    # Used by key bindings and layout
    self.example_page = 1
    self.is_prompting = False
    self.is_example_repl = False
    self.is_showing_default = False
    self.is_symbols = True


# Traceback (AssertionError)
(env36b) C:\Users\wilx\azure-cli>az interactive -s primary

Traceback (most recent call last):
File "C:\Users\wilx\azure-cli\env36b\lib\site-packages\knack\cli.py", line 194, in invoke
cmd_result = self.invocation.execute(args)
File "c:\users\wilx\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 347, in execute
six.reraise(*sys.exc_info())
File "C:\Users\wilx\azure-cli\env36b\lib\site-packages\six.py", line 693, in reraise
raise value
File "c:\users\wilx\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 319, in execute
result = cmd(params)
File "c:\users\wilx\azure-cli\src\azure-cli-core\azure\cli\core\commands\__init__.py", line 180, in __call__
return super(AzCliCommand, self).__call__(*args, **kwargs)
File "C:\Users\wilx\azure-cli\env36b\lib\site-packages\knack\commands.py", line 109, in __call__
return self.handler(*args, **kwargs)
File "c:\users\wilx\azure-cli\src\azure-cli-core\azure\cli\core\__init__.py", line 418, in default_command_handler
result = op(**command_args)
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\__init__.py", line 13, in start_shell
AzInteractiveShell(cmd.cli_ctx, style)()
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\azclishell\app.py", line 144, in __call__
self.run()
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\azclishell\app.py", line 690, in run
self.cli.buffers['symbols'].reset(
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\azclishell\app.py", line 151, in cli
self._cli = self.create_interface()
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\azclishell\app.py", line 369, in create_interface
application=self.create_application(),
File "c:\users\wilx\azure-cli\src\command_modules\azure-cli-interactive\azure\cli\command_modules\interactive\azclishell\app.py", line 362, in create_application
buffers=buffers,
File "C:\Users\wilx\azure-cli\env36b\lib\site-packages\prompt_toolkit\application.py", line 121, in __init__
assert style is None or isinstance(style, Style)
AssertionError

# Fixed code
def __init__(
    self,
    cli_ctx,
    style=None,
    completer=None,
    lexer=None,
    history=None,
    input_custom=sys.stdin,
    output_custom=None,
    user_feedback=False,
    intermediate_sleep=0.25,
    final_sleep=4,
):
    from .color_styles import style_factory

    self.cli_ctx = cli_ctx
    self.config = Configuration(cli_ctx.config, style=style)
    self.config.set_style(style)
    self.style = style_factory(self.config.get_style())
    self.lexer = lexer or get_az_lexer(self.config) if self.style else None
    try:
        self.completer = completer or AzCompleter(self, GatherCommands(self.config))
        self.completer.initialize_command_table_attributes()
    except IOError:  # if there is no cache
        self.completer = AzCompleter(self, None)
    self.history = history or FileHistory(
        os.path.join(self.config.config_dir, self.config.get_history())
    )
    os.environ[ENV_ADDITIONAL_USER_AGENT] = "AZURECLISHELL/" + __version__

    # OH WHAT FUN TO FIGURE OUT WHAT THESE ARE!
    self._cli = None
    self.layout = None
    self.description_docs = ""
    self.param_docs = ""
    self.example_docs = ""
    self.last = None
    self.last_exit = 0
    self.user_feedback = user_feedback
    self.input = input_custom
    self.output = output_custom
    self.config_default = ""
    self.default_command = ""
    self.threads = []
    self.curr_thread = None
    self.spin_val = -1
    self.intermediate_sleep = intermediate_sleep
    self.final_sleep = final_sleep
    self.command_table_thread = None

    # try to consolidate state information here...
    # Used by key bindings and layout
    self.example_page = 1
    self.is_prompting = False
    self.is_example_repl = False
    self.is_showing_default = False
    self.is_symbols = True