Earlier quoted context omitted.
Mypy is basically that. https://github.com/python/mypy
Also note that while this repo might look like a third party bolton (it started that way), the type hinting syntax is nowadays actually integrated in the language. The only thing you need to do is add appropriate type hints at function definitions and then run mypy in your build and CI and you got something that checks basically as strict as Java. For those saying it’s optional so can’t be trusted, consider that comp…
There's another comment making this claim elsewhere and I wonder if perhaps those assertions are coming from someone who doesn't write Java, or if my experience with mypy is just especially bad
I'll also point out that easily 90% of my heartburn with trying to typehint python in legacy projects is that python seems to encourage so much introspection and namespace trickery. It feels to me like the mypy audience is saying "well, there's a staticly typed language hiding in python so just don't use unsafe parts of the language and you'll be fine"