Uh oh!
There was an error while loading. Please reload this page.
gh-130472: Use fancycompleter in import completions - #148188
Conversation
- Make module completer return both names and values (dummy `sys` module in case of module completions) - Colorize completions using `colorize_matches` from FancyCompleter
loic-simon
left a comment
There was a problem hiding this comment.
Nice!! Here's a quick first pass, I'll play around with it in local later 😄
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Loïc Simon <loic.pano@gmail.com>
loic-simon
commented
Apr 10, 2026
Tested in local, all good for me! 🚀 |
pablogsal
commented
May 5, 2026
LGTM Great work @tomasr8 and thanks for the review @loic-simon. I have pushed a commit with some fixed and simplifications so it can make it to tomorrow's deadline! |
Documentation build overview
147 files changed · |
Uh oh!
There was an error while loading. Please reload this page.
Now that #130473 has been merged, let's use it for import completions as well.
This is my first stab at this. First, I did a bit of refactoring and extracted the getattr and colorize logic from
FancyCompleterinto reusable functions since I needed those for module completions. I also modifiedModuleCompleterto return attribute values in addition to names (for modules, it just returns thesysmodule as a dummy value, this is just to get the color right). Then I just needed to extendget_module_completionsto do the colorization.@loic-simon would love if you have some spare time to have a look :)