The `mypy --strict` command I used for checking wasn't reporting this. Thanks to Sybren for pointing it out.