I find mypy very helpful for refactoring Python codebases. It sometimes finds bugs before I run my refactored code, but a large percentage of the time it's just helpfully pointing out where I have the wrong number of args. Pareto principle strikes again.