Hacker News new | ask | show | jobs
by Twirrim 2674 days ago
Use a linter. Most IDEs will do it for you natively, and even if you're dealing with a terminal based editor like vim, it's really easy to get the output of pylint, flake8 etc. running in it. It's extremely rare I ever get a syntax error make it through to code review, let alone build/deploy.
1 comments

Linters catch the easy cases but when the problem spans multiple files they have no clue what is going on.
The mypy type linter performs type checking across files, in many cases even without explicit annotations.