You could also use mypy(https://mypy.readthedocs.io/en/latest/index.html) which is a static type checker for Python.