From 30f850b5678d12e495f3e679d967ce3a2a789275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 7 Apr 2019 18:26:29 +0200 Subject: [PATCH] Fix no-else-return pylint errors --- gajim/common/events.py | 3 +-- gajim/common/fuzzyclock.py | 6 ++---- gajim/common/socks5.py | 8 ++++---- gajim/gtk/account_wizard.py | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/gajim/common/events.py b/gajim/common/events.py index a33da82bc..ae885f15f 100644 --- a/gajim/common/events.py +++ b/gajim/common/events.py @@ -261,8 +261,7 @@ class Events: self._events[account][jid].remove(event) self.fire_event_removed([event]) return - else: - return True + return True if types: new_list = [] # list of events to keep removed_list = [] # list of removed events diff --git a/gajim/common/fuzzyclock.py b/gajim/common/fuzzyclock.py index e7554bcbd..0af47d594 100755 --- a/gajim/common/fuzzyclock.py +++ b/gajim/common/fuzzyclock.py @@ -90,8 +90,6 @@ class FuzzyClock: '0': self.HOUR_NAMES[now.tm_hour % 12], '1': self.HOUR_NAMES[(now.tm_hour + 1) % 12]} - elif fuzzyness == 3: + if fuzzyness == 3: return self.FUZZY_DAYTIME[int(round(now.tm_hour / 3.0))] - - else: - return self.FUZZY_WEEK[now.tm_wday] + return self.FUZZY_WEEK[now.tm_wday] diff --git a/gajim/common/socks5.py b/gajim/common/socks5.py index 817522205..4c584652d 100644 --- a/gajim/common/socks5.py +++ b/gajim/common/socks5.py @@ -712,10 +712,10 @@ class Socks5: return None self.file_props.stalled = False return lenn - else: - self.state = 8 # end connection - self.disconnect() - return -1 + + self.state = 8 # end connection + self.disconnect() + return -1 def _on_send_exception(self): # peer stopped reading diff --git a/gajim/gtk/account_wizard.py b/gajim/gtk/account_wizard.py index 1dd2be82d..5c6d7d64e 100644 --- a/gajim/gtk/account_wizard.py +++ b/gajim/gtk/account_wizard.py @@ -200,7 +200,7 @@ class AccountCreationWizard: self.back_button.set_sensitive(True) return - elif cur_page == 1: + if cur_page == 1: # We are adding an existing account anonymous = self.xml.get_object('anonymous_checkbutton1').\ get_active()