# Python Typing Source Map Use this page as the canonical source index when making typing modernization recommendations. ## Core Language and Library Docs - [Typing module documentation](https://docs.python.org/3/library/typing.html) - [Typing specification (typing.python.org)](https://typing.python.org/) - [Built-in types and generic aliases](https://docs.python.org/3/library/stdtypes.html) - [Python language reference: `match` statement](https://docs.python.org/3/reference/compound_stmts.html#the-match-statement) - [PEP 634: Structural Pattern Matching specification](https://peps.python.org/pep-0634/) - [typing.cast reference (runtime no-op)](https://docs.python.org/3/library/typing.html#typing.cast) - [Typing spec directives for `cast()`](https://typing.python.org/en/latest/spec/directives.html#cast) - [Mypy type narrowing and casts guidance](https://mypy.readthedocs.io/en/stable/type_narrowing.html#casts) - [Typing guide: exhaustiveness and `assert_never`](https://typing.python.org/en/latest/guides/unreachable.html#assert-never-and-exhaustiveness-checking) - [Mypy: `Literal`/`Enum` exhaustiveness with `match`](https://mypy.readthedocs.io/en/stable/literal_types.html#exhaustiveness-checking) ## Tooling References - [Astral ty documentation](https://docs.astral.sh/ty/) - [Astral ty usage reference (this skill)](./astral-ty.md) ## Modernization PEPs - [PEP 585: Type Hinting Generics In Standard Collections](https://peps.python.org/pep-0585/) - [PEP 604: Allow writing union types as `X | Y`](https://peps.python.org/pep-0604/) - [PEP 673: Self Type](https://peps.python.org/pep-0673/) - [PEP 695: Type Parameter Syntax](https://peps.python.org/pep-0695/) ## Advanced Typing PEPs (Load on Demand) - [PEP 612: Parameter Specification Variables](https://peps.python.org/pep-0612/) - [PEP 646: Variadic Generics](https://peps.python.org/pep-0646/) - [PEP 647: User-Defined Type Guards](https://peps.python.org/pep-0647/) - [PEP 655: Required and NotRequired for TypedDict](https://peps.python.org/pep-0655/) - [PEP 742: Narrowing types with TypeIs](https://peps.python.org/pep-0742/) ## Version Gate Reminder Before recommending syntax upgrades, verify the project's supported Python range and lint target so recommendations match runtime constraints.