Skip to content

Commit 3cf65a5

Browse files
Apply batched suggestions from code review
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 277857f commit 3cf65a5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Lib/idlelib/editor.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ def apply_bindings(self, keydefs=None):
11941194
# the sequences with the other case too (gh-56596).
11951195
for keys in keylist:
11961196
other = _letter_key_re.sub(lambda m: m[0].swapcase(), keys)
1197-
if other != keys:
1197+
if other not in keylist:
11981198
text.event_add(event, other)
11991199

12001200
def fill_menus(self, menudefs=None, keydefs=None):

‎Lib/idlelib/idle_test/test_editor.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def test_apply_bindings_caps_lock(self):
3636
# sequences are bound with both cases.
3737
e = Editor(root=self.root)
3838
try:
39-
e.apply_bindings({'<<spam>>': ['<Control-Key-s>', '<Key-F1>'],
40-
'<<eggs>>': ['<Control-Key-x><Alt-Shift-Key-S>']})
39+
e.apply_bindings({'<<spam>>': ('<Control-Key-s>', '<Key-F1>'),
40+
'<<eggs>>': ('<Control-Key-x><Alt-Shift-Key-S>',)})
4141
self.assertEqual(set(e.text.event_info('<<spam>>')),
4242
{'<Control-KeyPress-s>', '<Control-KeyPress-S>',
4343
'<KeyPress-F1>'})

0 commit comments

Comments
 (0)