Linters are indeed excellent tools.<p>A "what's wrong" which the linters don't find is that for/else is one of the more confusing aspects of the Python language, and should be avoided when there are equally clear alternatives.<p>That is, I believe that<p><pre><code> for entry in entries:
if entry == key:
break
else:
raise NotFoundError
</code></pre>
is better written as:<p><pre><code> if not any(entry == key for entry in entries):
raise NotFoundError</code></pre>
Why everybody's doing their on hooks instead of using a framework such as pre-commit [0] or Overcommit [1]?<p>[0] <a href="http://pre-commit.com/" rel="nofollow">http://pre-commit.com/</a><p>[1] <a href="https://github.com/brigade/overcommit" rel="nofollow">https://github.com/brigade/overcommit</a>