diff options
author | Torsten Marek <tmarek@google.com> | 2013-03-29 18:33:23 +0100 |
---|---|---|
committer | Torsten Marek <tmarek@google.com> | 2013-03-29 18:33:23 +0100 |
commit | 270db1b055cc233f905a362fb88284c3c600ef3a (patch) | |
tree | 86e3b8a11eda192c6bbfe3dbe09688968b9c670b /reporters | |
parent | 76d17375982a1537e0bf2d2f582a312f96a3457c (diff) | |
download | pylint-270db1b055cc233f905a362fb88284c3c600ef3a.tar.gz |
Emit a warning for loops that have an else clause but no break or return.
Technically, the else: is superfluous with the return statement, but after much internal
discussion, I've changed the patch to allow this. The main point is that the indented block
is useful as a visual marker to say that the loop may end early and end execution of the whole
block, or something else might happen afterwards. That being said, I wouldn't be terribly sad
if we took it out again.
Closes #81378
Diffstat (limited to 'reporters')
0 files changed, 0 insertions, 0 deletions