From 49f467903f18b4cba483cb3753d8f1d9b68e6cce Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 24 Mar 2020 16:07:40 +0100 Subject: [PATCH] Pylint: allow if-return-else-return Allow the perfectly reasonable idiom if condition1: return value1 else: return value2 Signed-off-by: Gilles Peskine --- .pylintrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index 037717e354..9f5b1c4cce 100644 --- a/.pylintrc +++ b/.pylintrc @@ -40,7 +40,12 @@ max-attributes=15 max-module-lines=2000 [MESSAGES CONTROL] -disable= +# * no-else-return: Allow the perfectly reasonable idiom +# if condition1: +# return value1 +# else: +# return value2 +disable=no-else-return [REPORTS] # Don't diplay statistics. Just the facts.