def __init__(self, area, *args, **kwargs): pattern = area.get(*area.get_seq_range()) completions = [ind[1][0] for ind in area.find_all(root, '[^ ]*%s[^ ]*' % pattern if pattern else '[^ ]+', nocase=True)] completions = set(completions) completions = [Option(ind) for ind in completions] CompletionWindow.__init__(self, area, completions, *args, **kwargs)
def __init__(self, area, *args, **kwargs): pattern = area.get_seq() completions = map( lambda ind: ind[1][0], area.find_all(root, '[^ ]*%s[^ ]*' % pattern if pattern else '[^ ]+', nocase=True)) completions = set(completions) completions = map(lambda ind: Option(ind), completions) CompletionWindow.__init__(self, area, completions, *args, **kwargs)
def build_docs(self, data): return [ Option(ind.get('insertion_text', ''), self.fmt_option(ind)) for ind in data['completions'] ]
def build(self, data): data = json.loads(data) return map(lambda ind: Option(ind['name']), data['completions'])
def build(self, data): data = json.loads(data) return map(lambda ind: Option(ind['name'], 'Type:%s' % ind['type'], 'Class:%s' % ind['class']), data[1])
def build(self, data): data = json.loads(data) return [Option(ind['name'], 'Type:%s' % ind['type'], 'Class:%s' % ind['class']) for ind in data[1]]
def build(self, data): data = json.loads(data) return [Option(ind['name']) for ind in data['completions']]
def build(self, data): data = json.loads(data) return [Option(**ind) for ind in data['completions']]