|
|
b536d82 |
From ef6b2e85be54a644e34125c68f1e5699b03709f2 Mon Sep 17 00:00:00 2001
|
|
|
b536d82 |
From: Julius Milan <jmilan@redhat.com>
|
|
|
b536d82 |
Date: Wed, 31 May 2017 11:43:31 +0200
|
|
|
b536d82 |
Subject: [PATCH] pylintrc: disable pylint no-else-return warnings
|
|
|
b536d82 |
|
|
|
b536d82 |
pylint's 1.7.1 new no-else-return (R1705) warnings enforces this style:
|
|
|
b536d82 |
|
|
|
b536d82 |
if whatever:
|
|
|
b536d82 |
return something
|
|
|
b536d82 |
return something_else
|
|
|
b536d82 |
|
|
|
b536d82 |
over this one
|
|
|
b536d82 |
|
|
|
b536d82 |
if whatever:
|
|
|
b536d82 |
return something
|
|
|
b536d82 |
else:
|
|
|
b536d82 |
return something_else
|
|
|
b536d82 |
|
|
|
b536d82 |
Disabling this kind of warnings, it is estetical only and furthermore
|
|
|
b536d82 |
the 2-nd one (the one to avoid) considered as more readable.
|
|
|
b536d82 |
---
|
|
|
b536d82 |
pylintrc | 2 +-
|
|
|
b536d82 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b536d82 |
|
|
|
b536d82 |
diff --git a/pylintrc b/pylintrc
|
|
|
b536d82 |
index c23b406..934d7c0 100644
|
|
|
b536d82 |
--- a/pylintrc
|
|
|
b536d82 |
+++ b/pylintrc
|
|
|
b536d82 |
@@ -30,7 +30,7 @@ load-plugins=
|
|
|
b536d82 |
# can either give multiple identifier separated by comma (,) or put this option
|
|
|
b536d82 |
# multiple time (only on the command line, not in the configuration file where
|
|
|
b536d82 |
# it should appear only once).
|
|
|
b536d82 |
-disable=C0111,W0212,R0201,R0903,R0904,I0011,W0603,W0622,I0001,R0912,E1101,C0302,C0330,E1102,W1202,E0012
|
|
|
b536d82 |
+disable=C0111,W0212,R0201,R0903,R0904,I0011,W0603,W0622,I0001,R0912,E1101,C0302,C0330,E1102,W1202,E0012,R1705
|
|
|
b536d82 |
|
|
|
b536d82 |
|
|
|
b536d82 |
[REPORTS]
|
|
|
b536d82 |
--
|
|
|
b536d82 |
2.7.5
|
|
|
b536d82 |
|