diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2016-12-29 22:10:53 +0100 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2016-12-29 22:10:53 +0100 |
commit | 961f65922cffcd76dd840406df80b2d7224fac56 (patch) | |
tree | 62eb4d86255f7367ee1902e0678f9e09d43cd7c6 | |
parent | 9b8b21c5fc50987162a3278b55663f3425013a32 (diff) |
Don't include add_binding and remove_binding to the BaseRegistry interface.
-rw-r--r-- | prompt_toolkit/key_binding/registry.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/prompt_toolkit/key_binding/registry.py b/prompt_toolkit/key_binding/registry.py index 3bbb7dea..24d0e729 100644 --- a/prompt_toolkit/key_binding/registry.py +++ b/prompt_toolkit/key_binding/registry.py @@ -69,13 +69,7 @@ class BaseRegistry(with_metaclass(ABCMeta, object)): """ Interface for a Registry. """ - @abstractmethod - def add_binding(self, *keys, **kwargs): - pass - - @abstractmethod - def remove_binding(self, function): - pass + _version = 0 # For cache invalidation. @abstractmethod def get_bindings_for_keys(self, keys): @@ -85,6 +79,9 @@ class BaseRegistry(with_metaclass(ABCMeta, object)): def get_bindings_starting_with_keys(self, keys): pass + # `add_binding` and `remove_binding` don't have to be part of this + # interface. + class Registry(BaseRegistry): """ |