Skip to content

Commit

Permalink
fix style (#5809)
Browse files Browse the repository at this point in the history
  • Loading branch information
williexu authored Mar 13, 2018
1 parent d1ada06 commit 1dbe0b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/command_modules/azure-cli-interactive/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Release History
0.3.18
++++++
* Completions kick in as soon as command table loading is done.
* Fix bug with using `--style` parameter.

0.3.17
++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class InteractiveCommandsLoader(AzCommandsLoader):
def __init__(self, cli_ctx=None):
super(InteractiveCommandsLoader, self).__init__(cli_ctx=cli_ctx)

def load_command_table(self, args):
def load_command_table(self, _):

with self.command_group('', operations_tmpl='azure.cli.command_modules.interactive#{}') as g:
g.command('interactive', 'start_shell')
return self.command_table

def load_arguments(self, command):
def load_arguments(self, _):

from azure.cli.command_modules.interactive.azclishell.color_styles import get_options as style_options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def __init__(self, cli_ctx, style=None, completer=None,
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
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()
Expand Down Expand Up @@ -354,7 +354,7 @@ def create_application(self, full_layout=True):

return Application(
mouse_support=False,
style=self.styles,
style=self.style,
buffer=writing_buffer,
on_input_timeout=self.on_input_timeout,
key_bindings_registry=InteractiveKeyBindings(self).registry,
Expand Down

0 comments on commit 1dbe0b4

Please sign in to comment.