◐ Shell
reader mode source ↗
Skip to content

bpo-6739: IDLE: Check for valid keybinding in config_keys#2377

Merged
terryjreedy merged 5 commits into
python:masterfrom
csabella:bpo6739
Jun 26, 2017
Merged

bpo-6739: IDLE: Check for valid keybinding in config_keys#2377
terryjreedy merged 5 commits into
python:masterfrom
csabella:bpo6739

Conversation

@csabella

Copy link
Copy Markdown
Contributor

Based on patch by Guilherme Polo.

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

I will submit a patch that addresses all my comments.

@csabella

Copy link
Copy Markdown
Contributor Author

I didn't see your commit until now. Your simplification of the new function was what I was thinking -- I guess the old discussion of one return vs many.

And I didn't know about this -> self.dialog.listKeysFinal.get.result to set a value on a StringVar in the tests. Cool. I hadn't figured out how to mock those.

@terryjreedy

Copy link
Copy Markdown
Member

listKeysFinal is a Listbox with a get(location) method, not a StringVar with get() and set(value) methods. Oh how I wish it were ;-). It is the vertical list in a box in the dialog with a, b, ...z, A, B, .....,DownArror. The .get(ANCHOR) call gets the currently line with a selection anchor, which in this case is set by clicking on an item. It took me awhile to figure out how to mock it so I could set the value to be returned by the call within the KeysOK function.

With the patch, the function is a bit odd in the argument is replaced by modifiers and key for some of the checks. More revision is needed in a further issue.

@terryjreedy terryjreedy merged commit 8c78aa7 into python:master Jun 26, 2017
terryjreedy pushed a commit to terryjreedy/cpython that referenced this pull request Jun 26, 2017
…onGH-2377)

Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo.  Tests added by Cheryl Sabella.
(cherry picked from commit 8c78aa7)
terryjreedy added a commit that referenced this pull request Jun 26, 2017
) (#2397)

Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo.  Tests added by Cheryl Sabella.
(cherry picked from commit 8c78aa7)
@csabella csabella deleted the bpo6739 branch June 26, 2017 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants