From 248afde21e21a389426f7ad8b084de28e78da492 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 19 Sep 2017 13:18:44 +0200 Subject: [PATCH] configapi: Also allow mode as posarg --- qutebrowser/config/configfiles.py | 4 ++-- tests/unit/config/test_configfiles.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py index fb8ac5f6d..9e66f4ffe 100644 --- a/qutebrowser/config/configfiles.py +++ b/qutebrowser/config/configfiles.py @@ -180,11 +180,11 @@ class ConfigAPI: with self._handle_error('setting', name): self._config.set_obj(name, value) - def bind(self, key, command, *, mode='normal', force=False): + def bind(self, key, command, mode='normal', *, force=False): with self._handle_error('binding', key): self._keyconfig.bind(key, command, mode=mode, force=force) - def unbind(self, key, *, mode='normal'): + def unbind(self, key, mode='normal'): with self._handle_error('unbinding', key): self._keyconfig.unbind(key, mode=mode) diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index e03b00fa6..b7c906b0c 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -202,7 +202,6 @@ class TestConfigPy: ]) def test_bind(self, confpy, line, mode): confpy.write(line) - configfiles.read_config_py(confpy.filename) confpy.read() expected = {mode: {',a': 'message-info foo'}} assert config.instance._values['bindings.commands'] == expected