From 1a4a9b43928783c5402a62d1384216e88be0c41e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 15 Dec 2017 14:53:56 +0100 Subject: [PATCH] Declare *args before keyword arguments See https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html --- qutebrowser/browser/hints.py | 5 +++-- qutebrowser/commands/runners.py | 2 +- qutebrowser/config/configtypes.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 2520dd712..14cc2b574 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -619,8 +619,9 @@ class HintManager(QObject): @cmdutils.register(instance='hintmanager', scope='tab', name='hint', star_args_optional=True, maxsplit=2) @cmdutils.argument('win_id', win_id=True) - def start(self, rapid=False, group=webelem.Group.all, target=Target.normal, - *args, win_id, mode=None, add_history=False): + def start(self, # pylint: disable=keyword-arg-before-vararg + group=webelem.Group.all, target=Target.normal, + *args, win_id, mode=None, add_history=False, rapid=False): """Start hinting. Args: diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 095b49108..890a0275e 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -126,7 +126,7 @@ class CommandParser: new_cmd += ' ' return new_cmd - def _parse_all_gen(self, text, aliases=True, *args, **kwargs): + def _parse_all_gen(self, text, *args, aliases=True, **kwargs): """Split a command on ;; and parse all parts. If the first command in the commandline is a non-split one, it only diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 320798f6b..71c32f59e 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -499,7 +499,7 @@ class ListOrValue(BaseType): _show_valtype = True - def __init__(self, valtype, none_ok=False, *args, **kwargs): + def __init__(self, valtype, *args, none_ok=False, **kwargs): super().__init__(none_ok) assert not isinstance(valtype, (List, ListOrValue)), valtype self.listtype = List(valtype, none_ok=none_ok, *args, **kwargs)