`ty` and `mypy` are efforts to add this to python. It's fairly inconsistent because of the vast library of python code that doesn't use it, much like early typescript. Unlike typescript, however, there's not the huge push right now to adopt because python coders are happy where they are.