Fix lint/bugs
This commit is contained in:
parent
796dce86ae
commit
9281fa3992
@ -452,14 +452,14 @@ class CommandDispatcher:
|
|||||||
hintmanager = objreg.get('hintmanager', scope='tab')
|
hintmanager = objreg.get('hintmanager', scope='tab')
|
||||||
if where == 'prev':
|
if where == 'prev':
|
||||||
hintmanager.follow_prevnext(frame, url, prev=True, tab=tab,
|
hintmanager.follow_prevnext(frame, url, prev=True, tab=tab,
|
||||||
background=background, window=window)
|
background=bg, window=window)
|
||||||
elif where == 'next':
|
elif where == 'next':
|
||||||
hintmanager.follow_prevnext(frame, url, prev=False, tab=tab,
|
hintmanager.follow_prevnext(frame, url, prev=False, tab=tab,
|
||||||
background=background, window=window)
|
background=bg, window=window)
|
||||||
elif where == 'up':
|
elif where == 'up':
|
||||||
self._navigate_up(url, tab, background, window)
|
self._navigate_up(url, tab, bg, window)
|
||||||
elif where in ('decrement', 'increment'):
|
elif where in ('decrement', 'increment'):
|
||||||
self._navigate_incdec(url, where, tab, background, window)
|
self._navigate_incdec(url, where, tab, bg, window)
|
||||||
else:
|
else:
|
||||||
raise ValueError("Got called with invalid value {} for "
|
raise ValueError("Got called with invalid value {} for "
|
||||||
"`where'.".format(where))
|
"`where'.".format(where))
|
||||||
|
@ -366,7 +366,7 @@ class Command:
|
|||||||
value = self._type_conv[param.name](value)
|
value = self._type_conv[param.name](value)
|
||||||
return name, value
|
return name, value
|
||||||
|
|
||||||
def _get_call_args(self, win_id):
|
def _get_call_args(self, win_id): # noqa
|
||||||
"""Get arguments for a function call.
|
"""Get arguments for a function call.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -168,7 +168,7 @@ class HintKeyParser(keyparser.CommandKeyParser):
|
|||||||
raise TypeError("Type {} is no Type member!".format(keytype))
|
raise TypeError("Type {} is no Type member!".format(keytype))
|
||||||
if keytype == self.Type.chain:
|
if keytype == self.Type.chain:
|
||||||
hintmanager = objreg.get('hintmanager', scope='tab',
|
hintmanager = objreg.get('hintmanager', scope='tab',
|
||||||
window=self._win_id, tab='current')
|
window=self._win_id, tab='current')
|
||||||
hintmanager.fire(cmdstr)
|
hintmanager.fire(cmdstr)
|
||||||
else:
|
else:
|
||||||
# execute as command
|
# execute as command
|
||||||
|
@ -151,7 +151,7 @@ def _get_registry(scope, window=None, tab=None):
|
|||||||
"""Get the correct registry for a given scope."""
|
"""Get the correct registry for a given scope."""
|
||||||
if window is not None and scope not in ('window', 'tab'):
|
if window is not None and scope not in ('window', 'tab'):
|
||||||
raise TypeError("window is set with scope {}".format(scope))
|
raise TypeError("window is set with scope {}".format(scope))
|
||||||
if tab is not None and scope != 'tab':
|
if tab is not None and scope != 'tab':
|
||||||
raise TypeError("tab is set with scope {}".format(scope))
|
raise TypeError("tab is set with scope {}".format(scope))
|
||||||
if scope == 'global':
|
if scope == 'global':
|
||||||
return global_registry
|
return global_registry
|
||||||
@ -229,4 +229,3 @@ def dump_objects():
|
|||||||
for line in data:
|
for line in data:
|
||||||
lines.append(" {}".format(line))
|
lines.append(" {}".format(line))
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user