Python 3.5 introduced type hinting. This is a way to annotate your code with type information. This is not enforced by the Python interpreter, but it can be used by other tools to help you write better code.
PEP 484 https://peps.python.org/pep-0484/
mypy is a tool that can be used to check your code for type errors. It can be used as a command line tool or as a plugin for your editor.