better typing

This commit is contained in:
John Lancaster
2026-06-21 15:41:22 -05:00
parent 57347077a9
commit 4f05f13e45
3 changed files with 62 additions and 0 deletions
@@ -7,6 +7,13 @@ Use this page as the canonical source index when making typing modernization rec
- [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