Skip to content

Commit c81e4cb

Browse files
committed
Sorting using key
1 parent 9abec5b commit c81e4cb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

SublimeCodeIntel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def _trigger(calltips, cplns=None):
313313
function = None if 'import ' in text else 'function'
314314
_completions = sorted(
315315
[('%s (%s)' % (n, t), n + ('($0)' if t == function else '')) for t, n in cplns],
316-
cmp=lambda a, b: cmp(a[1], b[1]) if a[1].startswith('_') == b[1].startswith('_') else 1 if a[1].startswith('_') else -1
316+
key=lambda o: o[1]
317317
)
318318
if _completions:
319319
# Show autocompletions:

0 commit comments

Comments
 (0)