Don't set scope in cmdutils.register w/o instance.
This commit is contained in:
parent
8f1b074595
commit
0195cb31bb
@ -81,6 +81,9 @@ class Command:
|
||||
for m in not_modes:
|
||||
if not isinstance(m, usertypes.KeyMode):
|
||||
raise TypeError("Mode {} is no KeyMode member!".format(m))
|
||||
if scope != 'global' and instance is None:
|
||||
raise ValueError("Setting scope without setting instance makes "
|
||||
"no sense!")
|
||||
self.name = name
|
||||
self.maxsplit = maxsplit
|
||||
self.hide = hide
|
||||
|
@ -34,7 +34,7 @@ from qutebrowser.config import style
|
||||
from qutebrowser.misc import consolewidget
|
||||
|
||||
|
||||
@cmdutils.register(scope='window', maxsplit=1, no_cmd_split=True)
|
||||
@cmdutils.register(maxsplit=1, no_cmd_split=True)
|
||||
def later(ms: {'type': int}, command, win_id: {'special': 'win_id'}):
|
||||
"""Execute a command after some time.
|
||||
|
||||
@ -63,7 +63,7 @@ def later(ms: {'type': int}, command, win_id: {'special': 'win_id'}):
|
||||
raise
|
||||
|
||||
|
||||
@cmdutils.register(scope='window', maxsplit=1, no_cmd_split=True)
|
||||
@cmdutils.register(maxsplit=1, no_cmd_split=True)
|
||||
def repeat(times: {'type': int}, command, win_id: {'special': 'win_id'}):
|
||||
"""Repeat a given command.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user