in service/azservice/__main__.py [0:0]
def get_argument_name_completions(command_table, query):
command_name = query['subcommand']
command = command_table[command_name]
arguments = query['arguments']
unused = { name: argument for name, argument in get_arguments(command).items()
if not [ option for option in get_options(argument.options_list) if option in arguments ]
and argument.type.settings.get('help') != '==SUPPRESS==' }
defaults = get_defaults(unused)
return [ {
'name': option,
'kind': 'argument_name',
'required': is_required(argument),
'default': not not defaults.get(name),
'detail': 'required' if is_required(argument) and not defaults.get(name) else None,
'documentation': argument.type.settings.get('help'),
'sortText': ('10_' if is_required(argument) and not defaults.get(name) else '20_') + option
} for name, argument in unused.items() for option in get_options(argument.options_list) ]