Type hinting in Python is useful for other developers to understand which data types to insert into your function. To automatically type check your code, use mypy.
The image above shows how mypy works.
Link to mypy.
Link to the source code.