2024-12-18 · Soraia Lins

Typing Pragmas Are Documentation You Cannot Delete

Macro photo of keycaps with warm side lighting

mypy pragmas feel like cheating until they become the only honest sentence about a messy integration. Quality Gates for Automation PRs encourages teams to write pragma comments that explain which human signed off on the risk.

That sentence matters when someone new inherits the script six months later. They read the pragma, ping the named reviewer, and learn the business rule that no type system will ever infer.

We still prefer clean types, but automation scripts live in the real world. Pragmas plus CI checks beat fantasy types that nobody runs. Close the loop by revisiting pragmas during retros; delete them when the upstream API finally stabilizes.

#typing #ci #python

← Back to field notes