diff --git a/.pylintrc b/.pylintrc index 599a43898..b086bff2d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -76,9 +76,9 @@ disable= locally-disabled, # Refactor no-self-use, too-many-arguments, too-many-branches, too-many-instance-attributes, - too-many-locals, too-few-public-methods, too-many-public-methods, too-many-statements, + too-many-locals, too-few-public-methods, too-many-public-methods, too-many-statements, # Refactor msgs that should eventually be enabled: - redefined-variable-type, simplifiable-if-statement, too-many-ancestors, + redefined-variable-type, too-many-ancestors, too-many-nested-blocks, too-many-return-statements, # Warning unused-argument, protected-access, import-error, unused-variable, diff --git a/deluge/ui/console/modes/cmdline.py b/deluge/ui/console/modes/cmdline.py index 2f9a0c3d5..a82197a4e 100644 --- a/deluge/ui/console/modes/cmdline.py +++ b/deluge/ui/console/modes/cmdline.py @@ -743,10 +743,7 @@ class CmdLine(BaseMode, Commander): """ - if len(line) == 0: - empty = True - else: - empty = False + empty = len(line) == 0 # Remove dangling backslashes to avoid breaking shlex if line.endswith("\\"): diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 8557003fb..2663b9dbd 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -474,10 +474,7 @@ class Preferences(component.Component): self.plugin_liststore.clear() # Iterate through the lists and add them to the liststore for plugin in all_plugins: - if plugin in enabled_plugins: - enabled = True - else: - enabled = False + enabled = plugin in enabled_plugins row = self.plugin_liststore.append() self.plugin_liststore.set_value(row, 0, plugin) self.plugin_liststore.set_value(row, 1, enabled)