Skip to contentSkip to conversation

btt_plot.py: Fix pylint: no-else-return

PATCH New Vincent Legoll 1 participant 1 message Mar 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 7/10 btt_plot.py: Fix pylint: no-else-return

Unnecessary "elif" after "return"

---
 btt/btt_plot.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
btt/btt_plot.py +3 -4
index 653ace7..b67caaa 100755
@@ -396,12 +396,11 @@ def do_live(files):
 	def live_sort(a, b):
 		if a[0] = 'sys' and b[0] = 'sys':
 			return 0
-		elif a[0] = 'sys' or a[2][0] < b[2][0]:
+		if a[0] = 'sys' or a[2][0] < b[2][0]:
 			return -1
-		elif b[0] = 'sys' or a[2][0] > b[2][0]:
+		if b[0] = 'sys' or a[2][0] > b[2][0]:
 			return  1
-		else:
-			return  0
+		return  0
 
 	#----------------------------------------------------------------------
 	def turn_off_ticks(ax):
Signature · 1 line
2.20.1