From a156d51844bd2b01f611d49be67b0d48e4ac498f Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 1 Dec 2015 20:53:17 +0100 Subject: [PATCH] Don't use for-else when returning. --- qutebrowser/commands/runners.py | 8 ++++---- qutebrowser/config/value.py | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 23eba1f49..9dfcfaf95 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -224,10 +224,10 @@ class CommandRunner(QObject): maxsplit = i + cmd.maxsplit + flag_arg_count return split.simple_split(argstr, keep=keep, maxsplit=maxsplit) - else: # pylint: disable=useless-else-on-loop - # If there are only flags, we got it right on the first try - # already. - return split_args + + # If there are only flags, we got it right on the first try + # already. + return split_args def run(self, text, count=None): """Parse a command from a line of text and run it. diff --git a/qutebrowser/config/value.py b/qutebrowser/config/value.py index 6e0dcf619..76c271a20 100644 --- a/qutebrowser/config/value.py +++ b/qutebrowser/config/value.py @@ -78,9 +78,7 @@ class SettingValue: for val in d.values(): if val is not None: return val - else: # pylint: disable=useless-else-on-loop - # https://bitbucket.org/logilab/pylint/issue/489/ - raise ValueError("No valid config value found!") + raise ValueError("No valid config value found!") def transformed(self): """Get the transformed value."""