all_completions returns nothing (simple fix suggested)
See original GitHub issueThe Completer.all_completions
method, which emacs python.el and elpy mode use, is returning nothing defined in the current scope. For example:
In [87]: xxx = 2
In [91]: get_ipython().Completer.all_completions('x')
Out[91]: ['%xdel', '%xmode']
In [92]: get_ipython().Completer.all_completions('xx')
Out[92]: []
Internally it’s using jedi but discarding jedi completions. Now, all_completions
calls the deprecated complete
instead of completions
. A simple change fixes both the usage of a deprecated method and a bug:
In [127]: list(map(lambda c: c.text, get_ipython().Completer.completions('x', len('x'))))
Out[127]: ['xxx', '%xdel', '%xmode']
Why not redefining all_completions
like that? At least the following is working for me inside an emacs inferior python session:
get_ipython().Completer.all_completions = lambda t: map(lambda c: c.text, get_ipython().Completer.completions(t, len(t)))
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[ST4] gopls: LSP not showing all completions provided by ...
Then quickly type a . (dot). This makes gopls return nothing. We seem to do everything correctly here: :: -> gopls textDocument/didChange ...
Read more >Managed expression - Arcade - Esri Community
Easy fix: just list your conditions in order of specificity. If your fields would not evaluate to being "Complate", then it's fine to...
Read more >Customizing bash completion output: each suggestion on a ...
I'm looking for a solution to display each possible solution on a new line, similar to the last column on a ls -l...
Read more >Turn auto complete on for Mac Terminal - Edward Beazer Blog
Save a lot of time by turning on autocomplete for your terminal · Press command key + x to save, then press y...
Read more >ChangeLog-16-current - Index of / - Asterisk.org
In this case, since reading ast_str_strlen returns 0, the returned substring is empty as opposed to the ... Fix suggested by Ross Beer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Carreau would you consider adding this to the next milestone? It’s easy to fix and it’s really critical for emacs users. Thanks!
Can we close this? The fix has already been merged.