From 4ce8a6eaf6791abd2bf7b1f0a707dd8cb30ab279 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 30 Nov 2018 13:07:44 +0100 Subject: [PATCH] Mark unreachable --- qutebrowser/commands/command.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py index 74cf659f7..51fe6cceb 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/command.py @@ -27,7 +27,7 @@ import typing import attr from qutebrowser.commands import cmdexc, argparser -from qutebrowser.utils import log, message, docutils, objreg, usertypes +from qutebrowser.utils import log, message, docutils, objreg, usertypes, utils from qutebrowser.utils import debug as debug_utils from qutebrowser.misc import objects @@ -441,6 +441,10 @@ class Command: self._add_special_arg(value=win_id, param=param, args=args, kwargs=kwargs) continue + elif arg_info.value is None: + pass + else: + raise utils.Unreachable(arg_info) value = self._get_param_value(param) if param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD: