File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -524,9 +524,8 @@ def complete(self, tab=False):
524524 if not self .argspec :
525525 return False
526526 else :
527- # remove duplicates and restore order
528- self .matches = sorted (set (matches ), self .cmp_matches ,
529- self .key_matches )
527+ # remove duplicates
528+ self .matches = matches
530529
531530
532531 if len (self .matches ) == 1 and not OPTS .auto_display_list :
@@ -537,19 +536,6 @@ def complete(self, tab=False):
537536 self .matches_iter .update (cw , self .matches )
538537 return True
539538
540- @staticmethod
541- def cmp_matches (a , b ):
542- if a .startswith (('__' , '_' )) and not b .startswith (('__' , '_' )):
543- return 1
544- elif b .startswith (('__' , '_' )) and not a .startswith (('__' , '_' )):
545- return - 1
546- else :
547- return cmp (a , b )
548-
549- @staticmethod
550- def key_matches (name ):
551- return name .rsplit ('.' )[- 1 ]
552-
553539 def format_docstring (self , docstring , width , height ):
554540 """Take a string and try to format it into a sane list of strings to be
555541 put into the suggestion box."""
You can’t perform that action at this time.
0 commit comments