On , I learnt ...

About mypy’s unreachable code functionality

Mypy can be configured to raise an error when it finds unreachable code. This is a useful check and can highlight several categories of bug.

To enable, ensure your setup.cfg includes:

[mypy]
warn_unreachable = true

Further reading: