[PATCH stable-2.15 05/17] Disable pylint too-many-branches warnings

539 views
Skip to first unread message

Brian Foley

unread,
Dec 6, 2016, 12:30:07 PM12/6/16
to ganeti...@googlegroups.com
This is useful, but in some cases is a little too conservative. A fn
can have a lot of branches, but very little nesting, and can still be
easy to understand. This occurs in, eg, XenPvmHypervisor._GetConfig.

Ganeti has many functions that fail this check, so disable it for now
until we get a chance to clean up the codebase.

Signed-off-by: Brian Foley <bpf...@google.com>
---
Makefile.am | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 108cbba..ba99fb8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2686,7 +2686,9 @@ PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(built_python_sources

# A space-separated list of pylint warnings to completely ignore:
# I0013 = disable warnings for ignoring whole files
-LINT_DISABLE = I0013
+# R0912 = disable too many branches warning. It's useful, but ganeti requires
+# a lot of refactoring to fix this.
+LINT_DISABLE = I0013 R0912
# Additional pylint options
LINT_OPTS =
# The combined set of pylint options
--
2.8.0.rc3.226.g39d4020

Iustin Pop

unread,
Dec 6, 2016, 4:10:33 PM12/6/16
to Brian Foley, ganeti...@googlegroups.com
On 2016-12-06 17:30:04, Ganeti Development List wrote:
> This is useful, but in some cases is a little too conservative. A fn
> can have a lot of branches, but very little nesting, and can still be
> easy to understand. This occurs in, eg, XenPvmHypervisor._GetConfig.

LGTM.
Reply all
Reply to author
Forward
0 new messages