From 48c7e72a41fa602acb5eaed5886e6b3cf7c5aaab Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Wed, 13 Aug 2014 15:42:10 +1000 Subject: [PATCH] Enable undefined-loop-variable pylint check This required a trivial refactor of two existing cases in the codebase. These two cases were perfectly correct, but the check uncovered a 3rd case which was a real bug (fixed separately). The new versions also make it clear that if the loop fails to break early then the 'result' is None (and thus an error) and not simply the last element. On balance, it's probably worth enforcing this small inconvenience to coding style. Change-Id: I780a95241f1454c6886d91f980eb9ada7678a119 Related-Bug: #1362466 --- .pylintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index 0c90b4ad3..23a04a7d0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -56,7 +56,6 @@ disable= signature-differs, star-args, super-init-not-called, - undefined-loop-variable, unnecessary-lambda, unnecessary-pass, unpacking-non-sequence,