-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-65460: IDLE: add completion of dict keys of type str #26039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
This PR is stale because it has been open for 30 days with no activity. |
@terryjreedy, how do we move forward with this? You previously mentioned the added complexity and amount of code as something you were weighing against the benefits of having this feature. To address that, this PR has less code than the previous one which also support keys of type bytes. Beyond that, I can commit to maintain this feature in the foreseeable future. I will mention that using this locally has been extremely nice, and I think this would make a greater positive impact on users' experiences than you may think. |
We need an update merge and resolution of test failures. Old test reports are gone. On my machine, test_idle passes on current main,. It fail thrice on this branch. Perhaps a result of changing mock_tk.Text.
Inserting ')' into mock Text on 324 should have closed it.
self.ct.open_calltip(True) on line 337 should leave a calltip.
Repeat of first error. |
Manual testing: Old bug: Please post on the list as to how you found this useful. |
@@ -22,24 +22,24 @@ def test_init(self): | |||
def test_index_empty(self): | |||
index = self.text.index | |||
|
|||
for dex in (-1.0, 0.3, '1.-1', '1.0', '1.0 lineend', '1.end', '1.33', | |||
for dex in ('0.0', '0.3', '1.0', '1.0 lineend', '1.end', '1.33', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test examples removed here and below are legal and intentional. Please reinstate or explain.
IDLE's shell auto-completion works for dict keys of types :class:`str` | ||
and :class:`bytes`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDLE's shell auto-completion works for dict keys of types :class:`str` | |
and :class:`bytes`. | |
IDLE's shell auto-completion works for dict keys of types :class:`str`. |
When you're done making the requested changes, leave the comment: |
Updating that this is currently blocked by completions being broken on Linux (bpo-45193). |
This is an updated version of PR GH-15169, rebased onto the current main branch and with support for keys of type bytes removed.
Note that completion is intentionally limited to keys of type str only.
Additional changes made in this PR: