Don't use for-else when returning.
This commit is contained in:
parent
31265b80b6
commit
a156d51844
@ -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.
|
||||
|
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user