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
LLMs have a really unfortunate habit of leaving comments that exactly describe the bug they just fixed. I keep getting code like this:
// Let Alice and Bob log in.
if user_tags is None:
I've started highlighting constructors like Some and None consistently with type names in difftastic, and the results look so much more readable!
I really like Stylus, the Firefox plugin for writing custom CSS for websites.
My rules aren't clever though.
The vast majority are just adding display: none; for distracting UI elements. The remainder are for excessively responsive sites that become unreadable on wide monitors.

