You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Correctly raise ValueError on unknown binding in KeyBindings.remove() #2042
When trying to remove from KeyBindings by Keys, an undocumented UnboundLocalError exception is raised instead of the documented ValueError.
To repro can add something like the following to test_remove_bindings:
h3=handlers.controla
...
# Test passing unbound key sequence to the remove() functionwithpytest.raises(ValueError):
bindings.remove(h3)
withpytest.raises(ValueError):
bindings.remove(Keys.ControlA)
Activity