Fix completion in indented lines dropping prefix when jedi is disabled#14474
Merged
Carreau merged 3 commits intoipython:mainfrom Aug 30, 2024
Merged
Fix completion in indented lines dropping prefix when jedi is disabled#14474Carreau merged 3 commits intoipython:mainfrom
Carreau merged 3 commits intoipython:mainfrom
Conversation
krassowski
commented
Jun 27, 2024
Member
Author
|
It would be good to add an E2E test for this one, most unit tests are on lower level functions |
krassowski
commented
Jun 27, 2024
|
Hi, Since I found this bug, I am happy to help as good as I can. I created a virtual env with Python 3.11 and built the package manually based on these changes. I did the same test and it worked. x = []
if True:
x.so <TAB> # completes to x.sortI was not sure, what else needed to be tested. Another exampled however failed: def f():
for i in range(10):
i. <TAB> # should not show anything, but now crashes..
Traceback (most recent call last):
File "/home/XXX/.virtualenvs/jedi-completion/lib/python3.11/site-packages/IPython/core/completer.py", line 3213, in _complete
result = matcher(context)
^^^^^^^^^^^^^^^^
File "/home/XXX/.virtualenvs/jedi-completion/lib/python3.11/site-packages/IPython/core/completer.py", line 2335, in python_matcher
matches, fragment = self._attr_matches(text, include_prefix=False)
^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)Maybe using TAB on a not yet defined variable is not practical, but I guess failing silently might be better ;) Happy to test other ideas! Best, |
krassowski
commented
Jul 3, 2024
Member
Author
|
Thank you @spreiter, I fixed this now. |
|
Tried with krassowski@5827cc8 , looks good. I can currently not think of any other test... So all in all, good work from my testing point of view. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14470
I would appreciate someone testing this PR.