Declare *args before keyword arguments

See https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html
This commit is contained in:
Florian Bruhin 2017-12-15 14:53:56 +01:00
parent fc987ea9c0
commit 1a4a9b4392
3 changed files with 5 additions and 4 deletions

View File

@ -619,8 +619,9 @@ class HintManager(QObject):
@cmdutils.register(instance='hintmanager', scope='tab', name='hint', @cmdutils.register(instance='hintmanager', scope='tab', name='hint',
star_args_optional=True, maxsplit=2) star_args_optional=True, maxsplit=2)
@cmdutils.argument('win_id', win_id=True) @cmdutils.argument('win_id', win_id=True)
def start(self, rapid=False, group=webelem.Group.all, target=Target.normal, def start(self, # pylint: disable=keyword-arg-before-vararg
*args, win_id, mode=None, add_history=False): group=webelem.Group.all, target=Target.normal,
*args, win_id, mode=None, add_history=False, rapid=False):
"""Start hinting. """Start hinting.
Args: Args:

View File

@ -126,7 +126,7 @@ class CommandParser:
new_cmd += ' ' new_cmd += ' '
return 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. """Split a command on ;; and parse all parts.
If the first command in the commandline is a non-split one, it only If the first command in the commandline is a non-split one, it only

View File

@ -499,7 +499,7 @@ class ListOrValue(BaseType):
_show_valtype = True _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) super().__init__(none_ok)
assert not isinstance(valtype, (List, ListOrValue)), valtype assert not isinstance(valtype, (List, ListOrValue)), valtype
self.listtype = List(valtype, none_ok=none_ok, *args, **kwargs) self.listtype = List(valtype, none_ok=none_ok, *args, **kwargs)