Skip to content

Commit

Permalink
cli: add missing return 0s to various handlers
Browse files Browse the repository at this point in the history
Should silence LGTM's [py/procedure-return-value-used] warnings.
  • Loading branch information
dgw committed Nov 18, 2019
1 parent bd02dc2 commit ca39957
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sopel/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def handle_list(options):
name, _ = os.path.splitext(config_filename)
print(name)

return 0 # successful operation


def handle_init(options):
"""Use config wizard to initialize a new configuration file for the bot
Expand Down Expand Up @@ -123,6 +125,7 @@ def handle_init(options):

print('Starting Sopel config wizard for: %s' % config_filename)
utils.wizard(config_name)
return 0 # successful operation


def handle_get(options):
Expand All @@ -147,6 +150,7 @@ def handle_get(options):

# Display the value
print(settings.get(section, option))
return 0 # successful operation


def main():
Expand Down
5 changes: 5 additions & 0 deletions sopel/cli/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def handle_list(options):

print(template.format(**description))

return 0 # successful operation


def handle_show(options):
"""Show plugin details"""
Expand Down Expand Up @@ -271,6 +273,7 @@ def handle_show(options):
print('Setup:', 'yes' if plugin.has_setup() else 'no')
print('Shutdown:', 'yes' if plugin.has_shutdown() else 'no')
print('Configure:', 'yes' if plugin.has_configure() else 'no')
return 0 # successful operation


def handle_configure(options):
Expand Down Expand Up @@ -305,6 +308,8 @@ def handle_configure(options):
"Use 'sopel-plugins enable {0}' to enable it".format(plugin_name)
)

return 0 # successful operation


def _handle_disable_plugin(settings, plugin_name, force):
excluded = settings.core.exclude
Expand Down

0 comments on commit ca39957

Please sign in to comment.