@property
    def add_key_binding(self):
        # Extra key bindings should not be active when the sidebar is visible.
        sidebar_visible = Condition(lambda cli: self.show_sidebar)

        def add_binding_decorator(*keys, **kw):
            # Pop default filter keyword argument.
            filter = kw.pop('filter', Always())
            assert not kw

            return self.key_bindings_registry.add_binding(*keys, filter=filter & ~sidebar_visible)
        return add_binding_decorator
Rewrite metadata since llvm3.6 dropped the "metadata" type prefix.
dataset/ETHPy150Open jonathanslenders/ptpython/ptpython/python_input.py/PythonInput.add_key_binding--crossover with--dataset/ETHPy150Open numba/numba/numba/hsa/hlc/utils.py/add_metadata_type