This was brought up by discussion in #4866 about use of type annotations - here's how I'd handle mypy to hopefully have it provide utility without causing headaches.