Don't use for-else when returning.

This commit is contained in:
Florian Bruhin 2015-12-01 20:53:17 +01:00
parent 31265b80b6
commit a156d51844
2 changed files with 5 additions and 7 deletions

View File

@ -224,7 +224,7 @@ class CommandRunner(QObject):
maxsplit = i + cmd.maxsplit + flag_arg_count maxsplit = i + cmd.maxsplit + flag_arg_count
return split.simple_split(argstr, keep=keep, return split.simple_split(argstr, keep=keep,
maxsplit=maxsplit) maxsplit=maxsplit)
else: # pylint: disable=useless-else-on-loop
# If there are only flags, we got it right on the first try # If there are only flags, we got it right on the first try
# already. # already.
return split_args return split_args

View File

@ -78,8 +78,6 @@ class SettingValue:
for val in d.values(): for val in d.values():
if val is not None: if val is not None:
return val 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): def transformed(self):