Type hints do not make Python check types when it runs. They are information, written in the code, for tools, for editors, and for you. A type checker such as mypy reads them and finds mistakes before the program runs, and the typing module has grown a precise vocabulary for describing real code. This lesson covers the advanced parts of that vocabulary, and, as important, what the interpreter itself does with the annotations that you write.
More lessons in Complete Python Programming