I see mypy more as a refactoring tool, but I'm always pleasantly surprised when it catches issues. It caught a bug here!
demo.py:96: error: Unsupported operand types for >= ("int" and "Optional[int]")
(In the code I've checked max_val is not None, but used min_val.)
miniblog.
Related Posts
Test code is total: we require it to always terminate or it's a failure! It also typically has 100% line and branch coverage.
I feel way less nervous about refactoring tests, you can always just run them.
Terminad is a really interesting approach to rendering markdown in the CLI. It deliberately doesn't render links, so you can always see both the link text and the URL.
In a browser you have hover to see URLs, but not necessarily in a terminal.
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!
