mypy kept python viable for me. I was working on a pretty complicated hw interface, which also used a lot of async/await. Even without what was basically my own coroutine implementation, there were just complicated (but not unusually so!) types in general. You know, just dicts of tuples of lists of tuples and the like.
At what felt like the 1000th runtime problem because of some type confusion somewhere (or just forgetting "await", which is essentially a no-op, since you got a promise that you threw away), and a lot of these problems happening much later than where the actual bug in the code was, I was ready to throw in the towel and bid python--and all other dynamic languages--good bye.
So I decided to try out mypy as some kind of last hurrah, and it paid out immediately. Adding the types went pretty quickly, and after that numerous problems were caught by the type checker, instead of manifesting as some obscure runtime problem down the way.
Most of the problems you mention could also be solved with a good test suit...
I'm not against mypy.. but after working near two years with typescript.. if I have to type I prefer to do it with compiled things...
- The formatting he is proposing for multiple args on a function with double tabs it's wired... O_O
- Same argument on mypy, if I want to type all variables, I perhaps will be happy doing it in go or rust.. python is dynamic :)
- pytest
- balck works so fine with vscode (pycharm will work if he disables linting code on every keystroke... )haha