TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Python linting at Venmo

6 pointsby simon_weberover 9 years ago

2 comments

dalkeover 9 years ago
Linters are indeed excellent tools.<p>A &quot;what&#x27;s wrong&quot; which the linters don&#x27;t find is that for&#x2F;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>
kolevover 9 years ago
Why everybody&#x27;s doing their on hooks instead of using a framework such as pre-commit [0] or Overcommit [1]?<p>[0] <a href="http:&#x2F;&#x2F;pre-commit.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;pre-commit.com&#x2F;</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;brigade&#x2F;overcommit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;brigade&#x2F;overcommit</a>