For questions related to PEP 484 (Type Hints), PEP 526 (Syntax for Variable Annotations) and the `typing` module.
Type hints in python, as specified by PEP 484 and PEP 483, are an optional feature that allow for detailed static analysis of python source code by third-party type-checkers. Popular third-party type-checkers include MyPy, Pylance, Pyright, Pyre, and PyCharm's builtin type-checker.
Support for type hints in python is provided by the typing module. Discussions regarding proposed enhancements to the typing
module and python-typing syntax take place on the typing-sig mailing list.
Relevant PEPs
Since PEP 484, a number of subsequent PEPs have modified, enhanced and extended Python's framework for type annotations, including:
PEP 526: "Syntax for Variable Annotations"
PEP 544: "Protocols: Structural subtyping (static duck typing)"
PEP 561: "Distributing and Packaging Type Information"
PEP 563: "Postponed Evaluation of Annotations"
See also: the April 2021 statement by the Python Steering Council regarding the future of this PEP.
PEP 585: "Type Hinting Generics In Standard Collections"
PEP 586: "Literal Types"
PEP 589: "TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys"
PEP 591: "Adding a final qualifier to typing"
PEP 593: "Flexible function and variable annotations"
Introducing
typing.Annotated
PEP 604: "Allow writing union types as X | Y"
PEP 612: "Parameter Specification Variables"
PEP 613: "Explicit Type Aliases"
PEP 647: "User-Defined Type Guards"