We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a5bcfe commit 7d2c790Copy full SHA for 7d2c790
Lib/_pyrepl/fancycompleter.py
@@ -100,6 +100,12 @@ def attr_matches(self, text):
100
noprefix = '__'
101
else:
102
noprefix = None
103
+
104
+ # sort the words now to make sure to return completions in
105
+ # alphabetical order. It's easier to do it now, else we would need to
106
+ # sort 'names' later but make sure that 'values' in kept in sync,
107
+ # which is annoying.
108
+ words = sorted(words)
109
while True:
110
for word in words:
111
if (
@@ -130,7 +136,6 @@ def attr_matches(self, text):
130
136
if prefix and prefix != attr:
131
137
return [f'{expr}.{prefix}'] # autocomplete prefix
132
138
133
- names.sort()
134
139
if self.use_colors:
135
140
return self.colorize_matches(names, values)
141
0 commit comments