From 1fdd7051c3d0c1d25809efc845684de2417c667d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 4 Apr 2015 22:03:28 +0200 Subject: [PATCH] config: Filter docs for change_filter. --- qutebrowser/config/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 59bffbc6f..61cf7f226 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -44,7 +44,7 @@ from qutebrowser.utils.usertypes import Completion class change_filter: # pylint: disable=invalid-name - """Decorator to register a new command handler. + """Decorator to filter calls based on a config section/option matching. This could also be a function, but as a class (with a "wrong" name) it's much cleaner to implement. @@ -60,7 +60,8 @@ class change_filter: # pylint: disable=invalid-name Gets called on parse-time with the decorator arguments. Args: - See class attributes. + sectname: The section to be filtered. + optname: The option to be filtered. """ if sectname not in configdata.DATA: raise configexc.NoSectionError(sectname) @@ -70,7 +71,7 @@ class change_filter: # pylint: disable=invalid-name self._optname = optname def __call__(self, func): - """Register the command before running the function. + """Filter calls to the decorated function. Gets called when a function should be decorated.